search for: hash_collapse

Displaying 1 result from an estimated 1 matches for "hash_collapse".

2000 Jul 02
2
``portability'' patch for OpenSSH S/Key support
...A_CTX ctx; char *p, *u; - char md[SHA_DIGEST_LENGTH]; /* * Base first 4 chars of seed on hostname. @@ -99,7 +98,7 @@ SHA1_Init(&ctx); SHA1_Update(&ctx, username, strlen(username)); - SHA1_End(&ctx, up); + SHA1_Final(up, &ctx); /* Collapse the hash */ ptr = hash_collapse(up); @@ -133,7 +132,7 @@ SHA1_Init(&ctx); SHA1_Update(&ctx, secret, secretlen); SHA1_Update(&ctx, username, strlen(username)); - SHA1_End(&ctx, up); + SHA1_Final(up, &ctx); /* Zero out */ memset(secret, 0, secretlen); @@ -141,7 +140,7 @@ /* Now hash the h...