From 9b19baf73e8c9dbd60ee36bcd1cb910bf01fa3d7 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 3 Jun 2014 09:09:09 +0200 Subject: use burn instead of memset when clearing RIPEMD context to ensure the compiler won't optimize it --- src/Crypto/Rmd160.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Crypto/Rmd160.c b/src/Crypto/Rmd160.c index cd215668..f90bf296 100644 --- a/src/Crypto/Rmd160.c +++ b/src/Crypto/Rmd160.c @@ -140,7 +140,7 @@ void RMD160Final(unsigned char *digest, RMD160_CTX *ctx) if (digest) { for (i = 0; i < 5; i++) PUT_32BIT_LE(digest + i * 4, ctx->state[i]); - memset (ctx, 0, sizeof(*ctx)); + burn (ctx, sizeof(*ctx)); } } -- cgit v1.2.3