From b3a1fd4e7faa5741fdf448f9095447db2611399a Mon Sep 17 00:00:00 2001 From: jsing Date: Thu, 28 Mar 2024 07:04:21 +0000 Subject: [PATCH] Inline initial hash values. --- lib/libcrypto/ripemd/ripemd.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/libcrypto/ripemd/ripemd.c b/lib/libcrypto/ripemd/ripemd.c index b07b85e9fe5..60ef403ded1 100644 --- a/lib/libcrypto/ripemd/ripemd.c +++ b/lib/libcrypto/ripemd/ripemd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ripemd.c,v 1.12 2024/03/28 07:03:25 jsing Exp $ */ +/* $OpenBSD: ripemd.c,v 1.13 2024/03/28 07:04:21 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -106,12 +106,6 @@ #define F5(x,y,z) (((~(z)) | (y)) ^ (x)) #endif -#define RIPEMD160_A 0x67452301L -#define RIPEMD160_B 0xEFCDAB89L -#define RIPEMD160_C 0x98BADCFEL -#define RIPEMD160_D 0x10325476L -#define RIPEMD160_E 0xC3D2E1F0L - #define KL0 0x00000000L #define KL1 0x5A827999L #define KL2 0x6ED9EBA1L @@ -394,11 +388,13 @@ int RIPEMD160_Init(RIPEMD160_CTX *c) { memset(c, 0, sizeof(*c)); - c->A = RIPEMD160_A; - c->B = RIPEMD160_B; - c->C = RIPEMD160_C; - c->D = RIPEMD160_D; - c->E = RIPEMD160_E; + + c->A = 0x67452301UL; + c->B = 0xEFCDAB89UL; + c->C = 0x98BADCFEUL; + c->D = 0x10325476UL; + c->E = 0xC3D2E1F0UL; + return 1; } -- 2.20.1