1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +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

@ -260,6 +260,15 @@ void md2_hmac_finish( md2_context *ctx, unsigned char output[16] )
memset( tmpbuf, 0, sizeof( tmpbuf ) );
}
/*
* MD2 HMAC context reset
*/
void md2_hmac_reset( md2_context *ctx )
{
md2_starts( ctx );
md2_update( ctx, ctx->ipad, 64 );
}
/*
* output = HMAC-MD2( hmac key, input buffer )
*/