summaryrefslogtreecommitdiff
path: root/cipher/rmd160.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2002-09-17 12:38:22 +0000
committerWerner Koch <wk@gnupg.org>2002-09-17 12:38:22 +0000
commite2952f48b02182a55cc00ce2fecbe0fa619c762d (patch)
tree3b4801ed13ff40ab3a011e063a66f3e6edc5a254 /cipher/rmd160.c
parent04bf238ac21fcc09d48940d8871832216c1b327f (diff)
downloadlibgcrypt-e2952f48b02182a55cc00ce2fecbe0fa619c762d.tar.gz
* random.c: Replaced mutex.h by the new ath.h. Changed all calls.
Diffstat (limited to 'cipher/rmd160.c')
-rw-r--r--cipher/rmd160.c51
1 files changed, 24 insertions, 27 deletions
diff --git a/cipher/rmd160.c b/cipher/rmd160.c
index 485683f6..3680f0ad 100644
--- a/cipher/rmd160.c
+++ b/cipher/rmd160.c
@@ -174,33 +174,30 @@ _gcry_rmd160_init( RMD160_CONTEXT *hd )
static void
transform( RMD160_CONTEXT *hd, byte *data )
{
- u32 a,b,c,d,e,aa,bb,cc,dd,ee,t;
- #ifdef BIG_ENDIAN_HOST
- u32 x[16];
- { int i;
- byte *p2, *p1;
- for(i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 ) {
- p2[3] = *p1++;
- p2[2] = *p1++;
- p2[1] = *p1++;
- p2[0] = *p1++;
- }
- }
- #else
- #if 0
- u32 *x =(u32*)data;
- #else
- /* this version is better because it is always aligned;
- * The performance penalty on a 586-100 is about 6% which
- * is acceptable - because the data is more local it might
- * also be possible that this is faster on some machines.
- * This function (when compiled with -02 on gcc 2.7.2)
- * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec;
- * [measured with a 4MB data and "gpgm --print-md rmd160"] */
- u32 x[16];
- memcpy( x, data, 64 );
- #endif
- #endif
+ register u32 a,b,c,d,e;
+ u32 aa,bb,cc,dd,ee,t;
+#ifdef BIG_ENDIAN_HOST
+ u32 x[16];
+ { int i;
+ byte *p2, *p1;
+ for(i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 ) {
+ p2[3] = *p1++;
+ p2[2] = *p1++;
+ p2[1] = *p1++;
+ p2[0] = *p1++;
+ }
+ }
+#else
+ /* this version is better because it is always aligned;
+ * The performance penalty on a 586-100 is about 6% which
+ * is acceptable - because the data is more local it might
+ * also be possible that this is faster on some machines.
+ * This function (when compiled with -02 on gcc 2.7.2)
+ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec;
+ * [measured with a 4MB data and "gpgm --print-md rmd160"] */
+ u32 x[16];
+ memcpy( x, data, 64 );
+#endif
#define K0 0x00000000