search for: hmac_sha1_final

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

2012 Sep 04
2
[PATCH] Generalize HMAC implementation
...RESULTLEN]) { - struct hmac_sha1_context ctx; + struct hmac_context ctx; unsigned char U[SHA1_RESULTLEN]; unsigned int j, k; /* Calculate U1 */ - hmac_sha1_init(&ctx, str, str_size); - hmac_sha1_update(&ctx, salt, salt_size); - hmac_sha1_update(&ctx, "\0\0\0\1", 4); - hmac_sha1_final(&ctx, U); + hmac_init(&ctx, str, str_size, &hash_method_sha1); + hmac_update(&ctx, salt, salt_size); + hmac_update(&ctx, "\0\0\0\1", 4); + hmac_final(&ctx, U); memcpy(result, U, SHA1_RESULTLEN); /* Calculate U2 to Ui and Hi */ for (j = 2; j <= i; j++)...