diff options
author | David Shaw <[email protected]> | 2003-05-24 18:31:33 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2003-05-24 18:31:33 +0000 |
commit | 29e6411a7bc1657fab1a3c2b847051a30e2247ea (patch) | |
tree | 62aeaf6d2fb67efd3023169a6d82b085a70c3100 /cipher/cast5.c | |
parent | * mpicoder.c, mpi-inline.h, mpi-inv.c, mpiutil.c, mpih-div.c, (diff) | |
download | gnupg-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/cast5.c')
-rw-r--r-- | cipher/cast5.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/cipher/cast5.c b/cipher/cast5.c index 5ecfcc646..a986f9f45 100644 --- a/cipher/cast5.c +++ b/cipher/cast5.c @@ -345,7 +345,7 @@ rol(int n, u32 x) return x; } #else - #define rol(n,x) ( ((x) << (n)) | ((x) >> (32-(n))) ) +#define rol(n,x) ( ((x) << (n)) | ((x) >> (32-(n))) ) #endif #define F1(D,m,r) ( (I = ((m) + (D))), (I=rol((r),I)), \ @@ -495,7 +495,7 @@ selftest(void) if( memcmp( buffer, plain, 8 ) ) return "2"; - #if 0 /* full maintenance test */ +#if 0 /* full maintenance test */ { int i; byte a0[16] = { 0x01,0x23,0x45,0x67,0x12,0x34,0x56,0x78, @@ -519,7 +519,7 @@ selftest(void) return "3"; } - #endif +#endif return NULL; } @@ -528,8 +528,8 @@ static void key_schedule( u32 *x, u32 *z, u32 *k ) { - #define xi(i) ((x[(i)/4] >> (8*(3-((i)%4)))) & 0xff) - #define zi(i) ((z[(i)/4] >> (8*(3-((i)%4)))) & 0xff) +#define xi(i) ((x[(i)/4] >> (8*(3-((i)%4)))) & 0xff) +#define zi(i) ((z[(i)/4] >> (8*(3-((i)%4)))) & 0xff) z[0] = x[0] ^ s5[xi(13)]^s6[xi(15)]^s7[xi(12)]^s8[xi(14)]^s7[xi( 8)]; z[1] = x[2] ^ s5[zi( 0)]^s6[zi( 2)]^s7[zi( 1)]^s8[zi( 3)]^s8[xi(10)]; @@ -567,8 +567,8 @@ key_schedule( u32 *x, u32 *z, u32 *k ) k[14]= s5[xi(12)]^s6[xi(13)]^s7[xi( 3)]^s8[xi( 2)]^s7[xi( 8)]; k[15]= s5[xi(14)]^s6[xi(15)]^s7[xi( 1)]^s8[xi( 0)]^s8[xi(13)]; - #undef xi - #undef zi +#undef xi +#undef zi } @@ -610,8 +610,8 @@ do_cast_setkey( CAST5_context *c, byte *key, unsigned keylen ) memset(&z,0, sizeof z); memset(&k,0, sizeof k); - #undef xi - #undef zi +#undef xi +#undef zi return 0; } @@ -652,4 +652,3 @@ cast5_get_info( int algo, size_t *keylen, return "CAST5"; return NULL; } - |