libssh2_hostkey_hash.3 (984B)
1.TH libssh2_hostkey_hash 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 2.SH NAME 3libssh2_hostkey_hash - return a hash of the remote host's key 4.SH SYNOPSIS 5.nf 6#include <libssh2.h> 7 8const char * 9libssh2_hostkey_hash(LIBSSH2_SESSION *session, int hash_type); 10.fi 11.SH DESCRIPTION 12\fIsession\fP - Session instance as returned by 13.BR libssh2_session_init_ex(3) 14 15\fIhash_type\fP - One of: \fBLIBSSH2_HOSTKEY_HASH_MD5\fP, 16\fBLIBSSH2_HOSTKEY_HASH_SHA1\fP or \fBLIBSSH2_HOSTKEY_HASH_SHA256\fP. 17 18Returns the computed digest of the remote system's hostkey. The length of 19the returned string is hash_type specific (e.g. 16 bytes for MD5, 2020 bytes for SHA1, 32 bytes for SHA256). 21.SH RETURN VALUE 22Computed hostkey hash value, or NULL if the information is not available 23(either the session has not yet been started up, or the requested hash 24algorithm was not available). The hash consists of raw binary bytes, not hex 25digits, so it is not directly printable. 26.SH SEE ALSO 27.BR libssh2_session_init_ex(3)