Calculates the OpenSSH fingerprint of a public key. This value should match what you get to see when connecting with SSH to a server. Note that some other systems might use a different algorithm to derive a (different) fingerprint for the same keypair.
Examples
mykey <- rsa_keygen()
pubkey <- as.list(mykey)$pubkey
fingerprint(mykey)
#> sha256 db:e4:06:0a:21:6f:54:49:80:cd:b6:67:4a:13:e7:2d:01:67:55:0d:08:2c:d8:d3:58:8e:60:c8:c3:d7:7d:d1
fingerprint(pubkey)
#> sha256 db:e4:06:0a:21:6f:54:49:80:cd:b6:67:4a:13:e7:2d:01:67:55:0d:08:2c:d8:d3:58:8e:60:c8:c3:d7:7d:d1
# Some systems use other hash functions
fingerprint(pubkey, sha1)
#> sha1 79:90:c7:b8:78:4b:78:97:d4:22:b9:6e:f1:b1:2c:6b:ce:0a:a8:9b
fingerprint(pubkey, sha256)
#> sha256 db:e4:06:0a:21:6f:54:49:80:cd:b6:67:4a:13:e7:2d:01:67:55:0d:08:2c:d8:d3:58:8e:60:c8:c3:d7:7d:d1
# Other key types
fingerprint(dsa_keygen())
#> sha256 08:2e:7f:78:c1:45:44:a3:e9:24:14:68:d3:0f:c0:c2:ee:2b:aa:ba:ef:77:e6:c3:91:1d:99:b4:3c:be:95:d6