WIP: Add compression to API (#91)

* Add compression to API

* Add docs

* Use defaults for a simpler interface

* Update x/crypto

* Fix ecdsa key types for lib update
This commit is contained in:
wussler 2020-11-04 17:40:45 +01:00 committed by GitHub
parent 9503b68f0c
commit 371d429001
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 177 additions and 31 deletions

View file

@ -328,10 +328,10 @@ func (key *Key) Check() (bool, error) {
func (key *Key) PrintFingerprints() {
for _, subKey := range key.entity.Subkeys {
if !subKey.Sig.FlagsValid || subKey.Sig.FlagEncryptStorage || subKey.Sig.FlagEncryptCommunications {
fmt.Println("SubKey:" + hex.EncodeToString(subKey.PublicKey.Fingerprint[:]))
fmt.Println("SubKey:" + hex.EncodeToString(subKey.PublicKey.Fingerprint))
}
}
fmt.Println("PrimaryKey:" + hex.EncodeToString(key.entity.PrimaryKey.Fingerprint[:]))
fmt.Println("PrimaryKey:" + hex.EncodeToString(key.entity.PrimaryKey.Fingerprint))
}
// GetHexKeyID returns the key ID, hex encoded as a string.
@ -346,7 +346,7 @@ func (key *Key) GetKeyID() uint64 {
// GetFingerprint gets the fingerprint from the key.
func (key *Key) GetFingerprint() string {
return hex.EncodeToString(key.entity.PrimaryKey.Fingerprint[:])
return hex.EncodeToString(key.entity.PrimaryKey.Fingerprint)
}
// GetSHA256Fingerprints computes the SHA256 fingerprints of the key and subkeys.