mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-24 21:46:50 +00:00
Use md_hmac_reset() when possible
This commit is contained in:
parent
658dbed080
commit
d742a032f4
|
@ -229,7 +229,7 @@ int hmac_drbg_random_with_add( void *p_rng,
|
||||||
{
|
{
|
||||||
size_t use_len = left > md_len ? md_len : left;
|
size_t use_len = left > md_len ? md_len : left;
|
||||||
|
|
||||||
md_hmac_starts( &ctx->md_ctx, ctx->K, md_len );
|
md_hmac_reset( &ctx->md_ctx );
|
||||||
md_hmac_update( &ctx->md_ctx, ctx->V, md_len );
|
md_hmac_update( &ctx->md_ctx, ctx->V, md_len );
|
||||||
md_hmac_finish( &ctx->md_ctx, ctx->V );
|
md_hmac_finish( &ctx->md_ctx, ctx->V );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue