From 3aaf5c70453d2bc4b2f1efe224e0adf0ff8a0ec2 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 25 Jul 2016 08:16:38 +0200 Subject: Windows: solve benchmark issue for Whirlpool which caused wrong numbers when a 1GB buffer is chosen. --- src/Crypto/Whirlpool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Crypto/Whirlpool.c') diff --git a/src/Crypto/Whirlpool.c b/src/Crypto/Whirlpool.c index 00f08eb7..19cfad2a 100644 --- a/src/Crypto/Whirlpool.c +++ b/src/Crypto/Whirlpool.c @@ -898,11 +898,11 @@ void WHIRLPOOL_init(WHIRLPOOL_CTX * const ctx) { * This method maintains the invariant: bufferBits < DIGESTBITS */ void WHIRLPOOL_add(const unsigned char * input, - unsigned __int32 sourceBits, + unsigned __int32 sourceBytes, WHIRLPOOL_CTX * const ctx) { uint64 num, oldCountLo = ctx->countLo, oldCountHi = ctx->countHi; - uint64 len = sourceBits >> 3; + uint64 len = sourceBytes; if ((ctx->countLo = oldCountLo + (uint64)len) < oldCountLo) ctx->countHi++; // carry from low to high -- cgit v1.2.3