summaryrefslogtreecommitdiff
path: root/crypto/des/ncbc_enc.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-10-24 21:21:12 +0000
committerRichard Levitte <levitte@openssl.org>2001-10-24 21:21:12 +0000
commitc2e4f17c1a0d4d5115c6ede9492de1615fe392ac (patch)
tree14dda5edeaebac01b4baa3aa026c40a784a44266 /crypto/des/ncbc_enc.c
parent979689aa5cfa100ccbc1f25064e9398be4b7b05c (diff)
downloadopenssl-new-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/ncbc_enc.c')
-rw-r--r--crypto/des/ncbc_enc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/des/ncbc_enc.c b/crypto/des/ncbc_enc.c
index 6be518486e..fda23d522f 100644
--- a/crypto/des/ncbc_enc.c
+++ b/crypto/des/ncbc_enc.c
@@ -1,8 +1,8 @@
/* crypto/des/ncbc_enc.c */
/*
* #included by:
- * cbc_enc.c (des_cbc_encrypt)
- * des_enc.c (des_ncbc_encrypt)
+ * cbc_enc.c (DES_cbc_encrypt)
+ * des_enc.c (DES_ncbc_encrypt)
*/
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
@@ -64,11 +64,11 @@
#include "des_locl.h"
#ifdef CBC_ENC_C__DONT_UPDATE_IV
-void des_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
- des_key_schedule *_schedule, des_cblock *ivec, int enc)
+void DES_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
+ DES_key_schedule *_schedule, DES_cblock *ivec, int enc)
#else
-void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
- des_key_schedule *_schedule, des_cblock *ivec, int enc)
+void DES_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
+ DES_key_schedule *_schedule, DES_cblock *ivec, int enc)
#endif
{
register DES_LONG tin0,tin1;
@@ -89,7 +89,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
c2l(in,tin1);
tin0^=tout0; tin[0]=tin0;
tin1^=tout1; tin[1]=tin1;
- des_encrypt1((DES_LONG *)tin,_schedule,DES_ENCRYPT);
+ DES_encrypt1((DES_LONG *)tin,_schedule,DES_ENCRYPT);
tout0=tin[0]; l2c(tout0,out);
tout1=tin[1]; l2c(tout1,out);
}
@@ -98,7 +98,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
c2ln(in,tin0,tin1,l+8);
tin0^=tout0; tin[0]=tin0;
tin1^=tout1; tin[1]=tin1;
- des_encrypt1((DES_LONG *)tin,_schedule,DES_ENCRYPT);
+ DES_encrypt1((DES_LONG *)tin,_schedule,DES_ENCRYPT);
tout0=tin[0]; l2c(tout0,out);
tout1=tin[1]; l2c(tout1,out);
}
@@ -116,7 +116,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
{
c2l(in,tin0); tin[0]=tin0;
c2l(in,tin1); tin[1]=tin1;
- des_encrypt1((DES_LONG *)tin,_schedule,DES_DECRYPT);
+ DES_encrypt1((DES_LONG *)tin,_schedule,DES_DECRYPT);
tout0=tin[0]^xor0;
tout1=tin[1]^xor1;
l2c(tout0,out);
@@ -128,7 +128,7 @@ void des_ncbc_encrypt(const unsigned char *in, unsigned char *out, long length,
{
c2l(in,tin0); tin[0]=tin0;
c2l(in,tin1); tin[1]=tin1;
- des_encrypt1((DES_LONG *)tin,_schedule,DES_DECRYPT);
+ DES_encrypt1((DES_LONG *)tin,_schedule,DES_DECRYPT);
tout0=tin[0]^xor0;
tout1=tin[1]^xor1;
l2cn(tout0,tout1,out,l+8);