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

@ -375,6 +375,15 @@ void md5_hmac_finish( md5_context *ctx, unsigned char output[16] )
memset( tmpbuf, 0, sizeof( tmpbuf ) );
}
/*
* MD5 HMAC context reset
*/
void md5_hmac_reset( md5_context *ctx )
{
md5_starts( ctx );
md5_update( ctx, ctx->ipad, 64 );
}
/*
* output = HMAC-MD5( hmac key, input buffer )
*/