add config to key generation
This commit is contained in:
parent
edf3da1573
commit
60d877f35d
2 changed files with 9 additions and 2 deletions
9
key.go
9
key.go
|
|
@ -2,6 +2,7 @@ package pm
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
|
@ -162,7 +163,13 @@ func (o *OpenPGP) GenerateKey(userName string, domain string, passphrase string,
|
|||
return o.getNow()
|
||||
}
|
||||
|
||||
cfg := &packet.Config{RSABits: bits, Time: timeNow}
|
||||
cfg := &packet.Config{
|
||||
RSABits: bits,
|
||||
Time: timeNow,
|
||||
DefaultHash: crypto.SHA256,
|
||||
DefaultCipher: packet.CipherAES256,
|
||||
}
|
||||
|
||||
newEntity, err := openpgp.NewEntity(email, comments, email, cfg)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue