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.
This commit is contained in:
Richard Levitte
2001-10-24 21:21:12 +00:00
parent 979689aa5c
commit c2e4f17c1a
58 changed files with 1479 additions and 900 deletions

View File

@@ -63,19 +63,19 @@
int _des_crypt(char *buf,int len,struct desparams *desp);
int _des_crypt(char *buf, int len, struct desparams *desp)
{
des_key_schedule ks;
DES_key_schedule ks;
int enc;
des_set_key_unchecked(&desp->des_key,&ks);
DES_set_key_unchecked(&desp->des_key,&ks);
enc=(desp->des_dir == ENCRYPT)?DES_ENCRYPT:DES_DECRYPT;
if (desp->des_mode == CBC)
des_ecb_encrypt((const_des_cblock *)desp->UDES.UDES_buf,
(des_cblock *)desp->UDES.UDES_buf,&ks,
DES_ecb_encrypt((const_DES_cblock *)desp->UDES.UDES_buf,
(DES_cblock *)desp->UDES.UDES_buf,&ks,
enc);
else
{
des_ncbc_encrypt(desp->UDES.UDES_buf,desp->UDES.UDES_buf,
DES_ncbc_encrypt(desp->UDES.UDES_buf,desp->UDES.UDES_buf,
len,&ks,&desp->des_ivec,enc);
#ifdef undef
/* len will always be %8 if called from common_crypt