www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: SSH2 host key length and hash compute

Re: SSH2 host key length and hash compute

From: Kalpesh Parekh <kalpesh.ork2_at_gmail.com>
Date: Mon, 1 Jul 2013 23:34:07 -0700

Hi Alex

The APIs I am using are libssh2_session_hostkey to retreive the host key
and libssh2_hostkey_hash to compute the hash from the key.

The first API returns the length of the host key in a variable passed to it
as a function argument. The variable is of size_t type and indicates the
size of host key. I need to convert this value to bits. Can you let me know
how can I do this?

This variable is passed to the second api and the hash is returned. Here
based on the type of host key, if it is RSA I request for the md5 hash and
sha1 hash for DSS key. Let me know if my assumption is correct here

Kalpesh

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-07-02

the libssh2 team