diff options
Diffstat (limited to 'lib/libc/hash/rmd160.c')
-rw-r--r-- | lib/libc/hash/rmd160.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/hash/rmd160.c b/lib/libc/hash/rmd160.c index a8c6a409611..f1d6cf72fab 100644 --- a/lib/libc/hash/rmd160.c +++ b/lib/libc/hash/rmd160.c @@ -32,7 +32,7 @@ #include <rmd160.h> #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: rmd160.c,v 1.12 2002/12/23 04:33:31 millert Exp $"; +static char rcsid[] = "$OpenBSD: rmd160.c,v 1.13 2003/12/14 11:22:35 markus Exp $"; #endif /* LIBC_SCCS and not lint */ #define PUT_64BIT_LE(cp, value) do { \ @@ -167,7 +167,11 @@ RMD160Transform(u_int32_t state[5], const u_char block[64]) int i; for (i = 0; i < 16; i++) - x[i] = swap32(*(u_int32_t*)(block+i*4)); + x[i] = (u_int32_t)( + (u_int32_t)(block[i*4 + 0]) | + (u_int32_t)(block[i*4 + 1]) << 8 | + (u_int32_t)(block[i*4 + 2]) << 16 | + (u_int32_t)(block[i*4 + 3]) << 24); #endif a = state[0]; |