diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-12-14 11:22:36 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-12-14 11:22:36 +0000 |
commit | dbee4c4fa256f0121a21448798d618560a96f5fe (patch) | |
tree | 6893022fe61779e3b4faadbbf1ae024acc3e58ec /sys/crypto/rmd160.c | |
parent | 1fb5cf17feb1796f43e7973090f1e3404cbbb890 (diff) |
alignment fixes (e.g sparc 64); from Daniel Lucq; ok millert, henning
Diffstat (limited to 'sys/crypto/rmd160.c')
-rw-r--r-- | sys/crypto/rmd160.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/crypto/rmd160.c b/sys/crypto/rmd160.c index 508944c7a22..b627a61f375 100644 --- a/sys/crypto/rmd160.c +++ b/sys/crypto/rmd160.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rmd160.c,v 1.3 2001/09/26 21:40:13 markus Exp $ */ +/* $OpenBSD: rmd160.c,v 1.4 2003/12/14 11:22:35 markus Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -164,7 +164,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]; |