Add documentation for SHA256 fingerprints
This commit is contained in:
parent
3c79f40acb
commit
9caf737bc7
2 changed files with 14 additions and 0 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
|
@ -8,6 +8,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
- Fixed test `TestMultipleKeyMessageEncryption`
|
||||
|
||||
### Added
|
||||
- SHA256 fingerprint support
|
||||
```go
|
||||
(key *Key) GetSHA256Fingerprints() (fingerprints []string)
|
||||
|
||||
// Helper
|
||||
GetSHA256Fingerprints(publicKey string) ([]string, error)
|
||||
|
||||
// Helper, mobile only, returns fingerprints encoded as JSON
|
||||
GetJsonSHA256Fingerprints(publicKey string) ([]byte, error)
|
||||
```
|
||||
|
||||
## [2.0.0] - 2020-01-06
|
||||
Since the open-sourcing of the library in May the API has been updated, listening to internal and
|
||||
external feedback, in order to have a flexible library, that can be used in a simple settings,
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ func EncryptAttachment(plainData []byte, fileName string, keyRing *crypto.KeyRin
|
|||
return decrypted, nil
|
||||
}
|
||||
|
||||
// GetJsonSHA256Fingerprints returns the SHA256 fingeprints of key and subkeys, encoded in JSON, since gomobile can not
|
||||
// handle arrays
|
||||
func GetJsonSHA256Fingerprints(publicKey string) ([]byte, error) {
|
||||
key, err := crypto.NewKeyFromArmored(publicKey)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue