1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

- Added reset functionality for HMAC context. Speed-up for some use-cases.

This commit is contained in:
Paul Bakker
2010-03-21 16:23:13 +00:00
parent 27caa8a17e
commit 7d3b661bfe
13 changed files with 100 additions and 2 deletions

View File

@ -356,6 +356,15 @@ void md4_hmac_finish( md4_context *ctx, unsigned char output[16] )
memset( tmpbuf, 0, sizeof( tmpbuf ) );
}
/*
* MD4 HMAC context reset
*/
void md4_hmac_reset( md4_context *ctx )
{
md4_starts( ctx );
md4_update( ctx, ctx->ipad, 64 );
}
/*
* output = HMAC-MD4( hmac key, input buffer )
*/