diff options
author | Ulf Möller <ulf@openssl.org> | 1999-06-08 15:52:47 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-06-08 15:52:47 +0000 |
commit | 93fd0fd61fee2f0499625cde8237db58ca7a35c6 (patch) | |
tree | 2d187b180393bbaef301caff8b9bbc8468064c78 /crypto/des | |
parent | bebf2787eaf121b6a4522fc8e072c740f0e4804e (diff) | |
download | openssl-93fd0fd61fee2f0499625cde8237db58ca7a35c6.tar.gz |
Don't #define _, and eliminate casts.
Diffstat (limited to 'crypto/des')
-rw-r--r-- | crypto/des/des.h | 9 | ||||
-rw-r--r-- | crypto/des/des_enc.c | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/crypto/des/des.h b/crypto/des/des.h index 8d3ca11567..c2aae6595e 100644 --- a/crypto/des/des.h +++ b/crypto/des/des.h @@ -87,15 +87,11 @@ typedef /* const */ unsigned char const_des_cblock[8]; typedef struct des_ks_struct { union { - des_cblock _; + des_cblock cblock; /* make sure things are correct size on machines with * 8 byte longs */ - DES_LONG pad[2]; + DES_LONG deslong[2]; } ks; -#if defined _ -# error "_ is defined, but some strange definition the DES library cannot handle that." -#endif -#define _ ks._ int weak_key; } des_key_schedule[16]; @@ -120,7 +116,6 @@ typedef struct des_ks_struct #define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) -#define C_Block des_cblock #define Key_schedule des_key_schedule #ifdef KERBEROS #define ENCRYPT DES_ENCRYPT diff --git a/crypto/des/des_enc.c b/crypto/des/des_enc.c index 3a30e64e56..f47d2a02da 100644 --- a/crypto/des/des_enc.c +++ b/crypto/des/des_enc.c @@ -84,7 +84,7 @@ void des_encrypt(DES_LONG *data, des_key_schedule ks, int enc) r=ROTATE(r,29)&0xffffffffL; l=ROTATE(l,29)&0xffffffffL; - s=(DES_LONG *)ks; + s=ks->ks.deslong; /* I don't know if it is worth the effort of loop unrolling the * inner loop */ if (enc) @@ -180,7 +180,7 @@ void des_encrypt2(DES_LONG *data, des_key_schedule ks, int enc) r=ROTATE(r,29)&0xffffffffL; l=ROTATE(l,29)&0xffffffffL; - s=(DES_LONG *)ks; + s=ks->ks.deslong; /* I don't know if it is worth the effort of loop unrolling the * inner loop */ if (enc) |