From 50bc2c972c9ddf16c965c9860599bcca347b5fe3 Mon Sep 17 00:00:00 2001 From: Mikhail Bystryantsev Date: Thu, 28 Jul 2022 04:23:09 +0300 Subject: [PATCH] ripemd160: fix byte order for big endian systems Fix hash last word byte order for big endian systems --- hash/ripemd160.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/ripemd160.c b/hash/ripemd160.c index 5d40ba20..c0d0dc3c 100644 --- a/hash/ripemd160.c +++ b/hash/ripemd160.c @@ -228,7 +228,7 @@ void ripemd160Final(Ripemd160Context *context, uint8_t *digest) ripemd160ProcessBlock(context); //Convert from host byte order to little-endian byte order - for(i = 0; i < 4; i++) + for(i = 0; i < 5; i++) { context->h[i] = htole32(context->h[i]); }