Clarify how to decrypt in README (#50)
This commit is contained in:
parent
608bedaaf1
commit
d1f6f7d718
1 changed files with 3 additions and 0 deletions
|
|
@ -180,6 +180,9 @@ pgpMessage, err := publicKeyRing.Encrypt(binMessage, privateKeyRing)
|
|||
// Armored message in pgpMessage.GetArmored()
|
||||
// pgpMessage can be obtained from NewPGPMessageFromArmored(ciphertext)
|
||||
|
||||
//pgpMessage can be obtained from a byte array
|
||||
var pgpMessage = crypto.NewPGPMessage([]byte)
|
||||
|
||||
privateKeyObj, err := crypto.NewKeyFromArmored(privateKey)
|
||||
unlockedKeyObj = privateKeyObj.Unlock(passphrase)
|
||||
privateKeyRing, err := crypto.NewKeyRing(unlockedKeyObj)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue