use burn instead of memset when clearing RIPEMD context to ensure the compiler won't optimize it

This commit is contained in:
Mounir IDRASSI 2014-06-03 09:09:09 +02:00
parent 5ebd79745d
commit 9b19baf73e
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}
}