Added tests and readme

This commit is contained in:
2026-05-12 06:20:51 +00:00
parent 7e85bb0fcc
commit 139c224a31
23 changed files with 1449 additions and 97 deletions
-10
View File
@@ -65,13 +65,3 @@ func FingerprintFromCertPEM(certPEM []byte) (string, error) {
}
return Fingerprint(cert), nil
}
// FingerprintFromPubKeyPEM parses a public-key PEM and returns its
// fingerprint over the same SPKI bytes.
func FingerprintFromPubKeyPEM(pubPEM []byte) (string, error) {
block, _ := pem.Decode(pubPEM)
if block == nil {
return "", errors.New("pubkey: no PEM block")
}
return FingerprintFromSPKI(block.Bytes), nil
}