aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/rmd160.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-05-24 18:31:33 +0000
committerDavid Shaw <[email protected]>2003-05-24 18:31:33 +0000
commit29e6411a7bc1657fab1a3c2b847051a30e2247ea (patch)
tree62aeaf6d2fb67efd3023169a6d82b085a70c3100 /cipher/rmd160.c
parent* mpicoder.c, mpi-inline.h, mpi-inv.c, mpiutil.c, mpih-div.c, (diff)
downloadgnupg-29e6411a7bc1657fab1a3c2b847051a30e2247ea.tar.gz
gnupg-29e6411a7bc1657fab1a3c2b847051a30e2247ea.zip
* bithelp.h, des.c, random.c, rndlinux.c, sha1.c, blowfish.c, elgamal.c,
rijndael.c, rndunix.c, sha256.c, cast5.c, idea-stub.c, rmd160.c, rndw32.c, sha512.c, md5.c, rmd160test.c, rsa.c, tiger.c: Edit all preprocessor instructions to remove whitespace before the '#'. This is not required by C89, but there are some compilers out there that don't like it.
Diffstat (limited to 'cipher/rmd160.c')
-rw-r--r--cipher/rmd160.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/cipher/rmd160.c b/cipher/rmd160.c
index d8e8584a3..6f4f5664c 100644
--- a/cipher/rmd160.c
+++ b/cipher/rmd160.c
@@ -175,7 +175,7 @@ static void
transform( RMD160_CONTEXT *hd, byte *data )
{
u32 a,b,c,d,e,aa,bb,cc,dd,ee,t;
- #ifdef BIG_ENDIAN_HOST
+#ifdef BIG_ENDIAN_HOST
u32 x[16];
{ int i;
byte *p2, *p1;
@@ -186,10 +186,10 @@ transform( RMD160_CONTEXT *hd, byte *data )
p2[0] = *p1++;
}
}
- #else
- #if 0
+#else
+#if 0
u32 *x =(u32*)data;
- #else
+#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
@@ -199,8 +199,8 @@ transform( RMD160_CONTEXT *hd, byte *data )
* [measured with a 4MB data and "gpgm --print-md rmd160"] */
u32 x[16];
memcpy( x, data, 64 );
- #endif
- #endif
+#endif
+#endif
#define K0 0x00000000
@@ -454,13 +454,13 @@ rmd160_mixblock( RMD160_CONTEXT *hd, char *buffer )
{
char *p = buffer;
transform( hd, buffer );
- #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
X(0);
X(1);
X(2);
X(3);
X(4);
- #undef X
+#undef X
}
@@ -514,18 +514,18 @@ rmd160_final( RMD160_CONTEXT *hd )
burn_stack (108+5*sizeof(void*));
p = hd->buf;
- #ifdef BIG_ENDIAN_HOST
- #define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \
+#ifdef BIG_ENDIAN_HOST
+#define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \
*p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0)
- #else /* little endian */
- #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
- #endif
+#else /* little endian */
+#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+#endif
X(0);
X(1);
X(2);
X(3);
X(4);
- #undef X
+#undef X
}
static byte *
@@ -585,4 +585,3 @@ rmd160_get_info( int algo, size_t *contextsize,
return "RIPEMD160";
}
-