From d742a032f4b6c8ae39468da35a5725f5640b8423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 30 Jan 2014 19:07:22 +0100 Subject: [PATCH] Use md_hmac_reset() when possible --- library/hmac_drbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/hmac_drbg.c b/library/hmac_drbg.c index 328ba9272e..7e361f404a 100644 --- a/library/hmac_drbg.c +++ b/library/hmac_drbg.c @@ -229,7 +229,7 @@ int hmac_drbg_random_with_add( void *p_rng, { 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_finish( &ctx->md_ctx, ctx->V );