Add SHA256 fingerprint utils and helpers (#41)
This commit is contained in:
parent
c8b7e87135
commit
3c79f40acb
8 changed files with 88 additions and 3 deletions
|
|
@ -46,3 +46,12 @@ func GenerateKey(name, email string, passphrase []byte, keyType string, bits int
|
|||
key.ClearPrivateParams()
|
||||
return locked.Armor()
|
||||
}
|
||||
|
||||
func GetSHA256Fingerprints(publicKey string) ([]string, error) {
|
||||
key, err := crypto.NewKeyFromArmored(publicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return key.GetSHA256Fingerprints(), nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue