diff options
author | Richard Levitte <levitte@openssl.org> | 2001-10-24 21:21:12 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-10-24 21:21:12 +0000 |
commit | c2e4f17c1a0d4d5115c6ede9492de1615fe392ac (patch) | |
tree | 14dda5edeaebac01b4baa3aa026c40a784a44266 /crypto/des/des_enc.c | |
parent | 979689aa5cfa100ccbc1f25064e9398be4b7b05c (diff) | |
download | openssl-c2e4f17c1a0d4d5115c6ede9492de1615fe392ac.tar.gz |
Due to an increasing number of clashes between modern OpenSSL and
libdes (which is still used out there) or other des implementations,
the OpenSSL DES functions are renamed to begin with DES_ instead of
des_. Compatibility routines are provided and declared by including
openssl/des_old.h. Those declarations are the same as were in des.h
when the OpenSSL project started, which is exactly how libdes looked
at that time, and hopefully still looks today.
The compatibility functions will be removed in some future release, at
the latest in version 1.0.
Diffstat (limited to 'crypto/des/des_enc.c')
-rw-r--r-- | crypto/des/des_enc.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/crypto/des/des_enc.c b/crypto/des/des_enc.c index 81633c0c67..dfabd49198 100644 --- a/crypto/des/des_enc.c +++ b/crypto/des/des_enc.c @@ -58,7 +58,7 @@ #include "des_locl.h" -void des_encrypt1(DES_LONG *data, des_key_schedule *ks, int enc) +void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc) { register DES_LONG l,r,t,u; #ifdef DES_PTR @@ -156,7 +156,7 @@ void des_encrypt1(DES_LONG *data, des_key_schedule *ks, int enc) l=r=t=u=0; } -void des_encrypt2(DES_LONG *data, des_key_schedule *ks, int enc) +void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc) { register DES_LONG l,r,t,u; #ifdef DES_PTR @@ -247,8 +247,8 @@ void des_encrypt2(DES_LONG *data, des_key_schedule *ks, int enc) l=r=t=u=0; } -void des_encrypt3(DES_LONG *data, des_key_schedule *ks1, - des_key_schedule *ks2, des_key_schedule *ks3) +void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, + DES_key_schedule *ks2, DES_key_schedule *ks3) { register DES_LONG l,r; @@ -257,9 +257,9 @@ void des_encrypt3(DES_LONG *data, des_key_schedule *ks1, IP(l,r); data[0]=l; data[1]=r; - des_encrypt2((DES_LONG *)data,ks1,DES_ENCRYPT); - des_encrypt2((DES_LONG *)data,ks2,DES_DECRYPT); - des_encrypt2((DES_LONG *)data,ks3,DES_ENCRYPT); + DES_encrypt2((DES_LONG *)data,ks1,DES_ENCRYPT); + DES_encrypt2((DES_LONG *)data,ks2,DES_DECRYPT); + DES_encrypt2((DES_LONG *)data,ks3,DES_ENCRYPT); l=data[0]; r=data[1]; FP(r,l); @@ -267,8 +267,8 @@ void des_encrypt3(DES_LONG *data, des_key_schedule *ks1, data[1]=r; } -void des_decrypt3(DES_LONG *data, des_key_schedule *ks1, - des_key_schedule *ks2, des_key_schedule *ks3) +void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, + DES_key_schedule *ks2, DES_key_schedule *ks3) { register DES_LONG l,r; @@ -277,9 +277,9 @@ void des_decrypt3(DES_LONG *data, des_key_schedule *ks1, IP(l,r); data[0]=l; data[1]=r; - des_encrypt2((DES_LONG *)data,ks3,DES_DECRYPT); - des_encrypt2((DES_LONG *)data,ks2,DES_ENCRYPT); - des_encrypt2((DES_LONG *)data,ks1,DES_DECRYPT); + DES_encrypt2((DES_LONG *)data,ks3,DES_DECRYPT); + DES_encrypt2((DES_LONG *)data,ks2,DES_ENCRYPT); + DES_encrypt2((DES_LONG *)data,ks1,DES_DECRYPT); l=data[0]; r=data[1]; FP(r,l); @@ -290,12 +290,12 @@ void des_decrypt3(DES_LONG *data, des_key_schedule *ks1, #ifndef DES_DEFAULT_OPTIONS #undef CBC_ENC_C__DONT_UPDATE_IV -#include "ncbc_enc.c" /* des_ncbc_encrypt */ +#include "ncbc_enc.c" /* DES_ncbc_encrypt */ -void des_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, - long length, des_key_schedule *ks1, - des_key_schedule *ks2, des_key_schedule *ks3, - des_cblock *ivec, int enc) +void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, + long length, DES_key_schedule *ks1, + DES_key_schedule *ks2, DES_key_schedule *ks3, + DES_cblock *ivec, int enc) { register DES_LONG tin0,tin1; register DES_LONG tout0,tout1,xor0,xor1; @@ -322,7 +322,7 @@ void des_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, tin[0]=tin0; tin[1]=tin1; - des_encrypt3((DES_LONG *)tin,ks1,ks2,ks3); + DES_encrypt3((DES_LONG *)tin,ks1,ks2,ks3); tout0=tin[0]; tout1=tin[1]; @@ -337,7 +337,7 @@ void des_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, tin[0]=tin0; tin[1]=tin1; - des_encrypt3((DES_LONG *)tin,ks1,ks2,ks3); + DES_encrypt3((DES_LONG *)tin,ks1,ks2,ks3); tout0=tin[0]; tout1=tin[1]; @@ -364,7 +364,7 @@ void des_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, tin[0]=tin0; tin[1]=tin1; - des_decrypt3((DES_LONG *)tin,ks1,ks2,ks3); + DES_decrypt3((DES_LONG *)tin,ks1,ks2,ks3); tout0=tin[0]; tout1=tin[1]; @@ -385,7 +385,7 @@ void des_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, tin[0]=tin0; tin[1]=tin1; - des_decrypt3((DES_LONG *)tin,ks1,ks2,ks3); + DES_decrypt3((DES_LONG *)tin,ks1,ks2,ks3); tout0=tin[0]; tout1=tin[1]; |