diff options
author | Hans Nilsson <[email protected]> | 2016-11-03 13:18:59 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2016-11-22 12:22:45 +0100 |
commit | 2d34e43c8c37fa153927f1aae78032da5ab176a8 (patch) | |
tree | 4f4d41ae3e0e9c7d7c03f81d82b2047de9a665ae /lib/public_key/doc | |
parent | 4683b5c227a238ee27f658bdfe2981c4b69acf09 (diff) | |
download | otp-2d34e43c8c37fa153927f1aae78032da5ab176a8.tar.gz otp-2d34e43c8c37fa153927f1aae78032da5ab176a8.tar.bz2 otp-2d34e43c8c37fa153927f1aae78032da5ab176a8.zip |
public_key: ssh host key fingerprint generator added
Diffstat (limited to 'lib/public_key/doc')
-rw-r--r-- | lib/public_key/doc/src/public_key.xml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/public_key/doc/src/public_key.xml b/lib/public_key/doc/src/public_key.xml index 385604677c..edebfe0f84 100644 --- a/lib/public_key/doc/src/public_key.xml +++ b/lib/public_key/doc/src/public_key.xml @@ -822,6 +822,36 @@ fun(#'DistributionPoint'{}, #'CertificateList'{}, </func> <func> + <name>ssh_hostkey_fingerprint(HostKey) -> string()</name> + <name>ssh_hostkey_fingerprint(DigestType, HostKey) -> string()</name> + <fsummary>Calculates a ssh fingerprint for a hostkey.</fsummary> + <type> + <v>Key = public_key()</v> + <v>DigestType = digest_type()</v> + </type> + <desc> + <p>Calculates a ssh fingerprint from a public host key as openssh does.</p> + <p>The algorithm in <c>ssh_hostkey_fingerprint/1</c> is md5 to be compatible with older + ssh-keygen commands. The string from the second variant is prepended by the algorithm name + in uppercase as in newer ssh-keygen commands.</p> + <p>Examples:</p> + <code> + 2> public_key:ssh_hostkey_fingerprint(Key). + "f5:64:a6:c1:5a:cb:9f:0a:10:46:a2:5c:3e:2f:57:84" + + 3> public_key:ssh_hostkey_fingerprint(md5,Key). + "MD5:f5:64:a6:c1:5a:cb:9f:0a:10:46:a2:5c:3e:2f:57:84" + + 4> public_key:ssh_hostkey_fingerprint(sha,Key). + "SHA1:bSLY/C4QXLDL/Iwmhyg0PGW9UbY" + + 5> public_key:ssh_hostkey_fingerprint(sha256,Key). + "SHA256:aZGXhabfbf4oxglxltItWeHU7ub3Dc31NcNw2cMJePQ" + </code> + </desc> + </func> + + <func> <name>verify(Msg, DigestType, Signature, Key) -> boolean()</name> <fsummary>Verifies a digital signature.</fsummary> <type> |