1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00

Use LIBSSH2_HOSTKEY_HASH_SHA1 instead of _MD5 in examples and tests

MD5 support is optional and may not always be available, while SHA1 is both
required and recommended.
This commit is contained in:
Peter Stuge
2010-01-29 23:06:31 +01:00
parent 3ddac8ac66
commit 6df87e64b7
17 changed files with 34 additions and 34 deletions

View File

@ -150,9 +150,9 @@ int main(int argc, char *argv[])
* hard coded, may go to a file, may present it to the user, that's your
* call
*/
fingerprint = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_MD5);
fingerprint = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA1);
printf("Fingerprint: ");
for(i = 0; i < 16; i++) {
for(i = 0; i < 20; i++) {
printf("%02X ", (unsigned char)fingerprint[i]);
}
printf("\n");