59 #ifndef HEADER_NEW_DES_H
60 #define HEADER_NEW_DES_H
66 #error DES is disabled.
69 #ifdef OPENSSL_BUILD_SHLIBCRYPTO
70 # undef OPENSSL_EXTERN
71 # define OPENSSL_EXTERN OPENSSL_EXPORT
94 #ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT
95 # ifndef OPENSSL_ENABLE_OLD_DES_SUPPORT
96 # define OPENSSL_ENABLE_OLD_DES_SUPPORT
100 #ifdef OPENSSL_ENABLE_OLD_DES_SUPPORT
104 #define DES_KEY_SZ (sizeof(DES_cblock))
105 #define DES_SCHEDULE_SZ (sizeof(DES_key_schedule))
107 #define DES_ENCRYPT 1
108 #define DES_DECRYPT 0
110 #define DES_CBC_MODE 0
111 #define DES_PCBC_MODE 1
113 #define DES_ecb2_encrypt(i,o,k1,k2,e) \
114 DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))
116 #define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \
117 DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))
119 #define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \
120 DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))
122 #define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \
123 DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
126 #define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key)
128 #define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode)
134 DES_LONG
DES_cbc_cksum(
const unsigned char *input,DES_cblock *output,
136 const_DES_cblock *ivec);
146 const_DES_cblock *inw,const_DES_cblock *outw,
int enc);
147 void DES_cfb_encrypt(
const unsigned char *in,
unsigned char *out,
int numbits,
184 DES_cblock *ivec1,DES_cblock *ivec2,
189 DES_cblock *ivec,
int *
num,
int enc);
193 DES_cblock *ivec,
int enc);
197 DES_cblock *ivec,
int *
num);
199 void DES_xwhite_in2out(const_DES_cblock *DES_key,const_DES_cblock *in_white,
200 DES_cblock *out_white);
207 char *
DES_fcrypt(
const char *buf,
const char *salt,
char *ret);
208 char *
DES_crypt(
const char *buf,
const char *salt);
209 void DES_ofb_encrypt(
const unsigned char *in,
unsigned char *out,
int numbits,
214 DES_LONG
DES_quad_cksum(
const unsigned char *input,DES_cblock output[],
242 #define DES_fixup_key_parity DES_set_odd_parity