Add ToPublic method to get a public key object from a private key (#65)

This commit is contained in:
wussler 2020-07-22 17:13:23 +02:00 committed by GitHub
parent 48f05401ce
commit 979fdb3f4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 0 deletions

View file

@ -32,6 +32,11 @@ EncryptBinaryMessageArmored(key string, data []byte) (string, error)
DecryptBinaryMessageArmored(privateKey string, passphrase []byte, ciphertext string) ([]byte, error)
```
- Method to derive a public key object from a private key
```go
(key *Key) ToPublic() (publicKey *Key, err error)
```
### Changed
- Improved key and message armoring testing
- `EncryptSessionKey` now creates encrypted key packets for each valid encryption key in the provided keyring.