Correction to README.md (#71)

This commit is contained in:
marinthiercelin 2020-08-26 11:06:50 +02:00 committed by GitHub
parent fd9e7b40a9
commit 475db8b1cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,7 +340,7 @@ sessionKey, err := crypto.GenerateSessionKey()
keyPacket, err := publicKeyRing.EncryptSessionKey(sessionKey) // Will encrypt to all the keys in the keyring
keyPacketSymm, err := crypto.EncryptSessionKeyWithPassword(sessionKey, password)
```
`KeyPacket` is a `[]byte` containing the session key encrypted with the private key or password.
`KeyPacket` is a `[]byte` containing the session key encrypted with the public key or password.
```go
decodedKeyPacket, err := privateKeyRing.DecryptSessionKey(keyPacket) // Will decode with the first valid key found