SSH.Session.HostKeyHash - charonn0/RB-libssh2 GitHub Wiki

SSH.Session.HostKeyHash

Method Signature

 Function HostKeyHash(Type As SSH.HashType) As MemoryBlock

Parameters

HostKeyHash(HashType)

Name Type Comment
Type HashType The type of hash to generate.

Return value

Returns the computed digest of the remote system's hostkey. The size of the returned MemoryBlock is HashType specific (16 bytes for MD5, 20 bytes for SHA1, 32 bytes for SHA256). Returns Nil if the session has not yet been started up or the requested hash algorithm was not available.