62 #ifndef _OSCONFIG_DEFINED
63 #if defined( INC_ALL )
71 #define DES_LONG unsigned int
73 #define DES_LONG unsigned long
77 #error DES is disabled.
80 #ifdef _KERBEROS_DES_H
81 #error <openssl/des.h> replaces <kerberos/des.h>.
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))
135 const_des_cblock *ivec);
145 const_des_cblock *inw,const_des_cblock *outw,
int enc);
146 void des_cfb_encrypt(
const unsigned char *in,
unsigned char *out,
int numbits,
183 des_cblock *ivec1,des_cblock *ivec2,
188 des_cblock *ivec,
int *num,
int enc);
192 des_cblock *ivec,
int *num);
195 des_cblock *out_white);
203 #if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT)
204 char *
crypt(
const char *buf,
const char *
salt);
206 void des_ofb_encrypt(
const unsigned char *in,
unsigned char *out,
int numbits,
212 long length,
int out_count,des_cblock *seed);
217 const char *prompt,
int verify);
236 int des_read_pw(
char *buf,
char *buff,
int size,
const char *prompt,
int verify);
241 #define _KERBEROS_DES_H
243 #define KRBDES_ENCRYPT DES_ENCRYPT
244 #define KRBDES_DECRYPT DES_DECRYPT
247 # define ENCRYPT DES_ENCRYPT
248 # define DECRYPT DES_DECRYPT
252 # define C_Block des_cblock
253 # define Key_schedule des_key_schedule
254 # define KEY_SZ DES_KEY_SZ
255 # define string_to_key des_string_to_key
256 # define read_pw_string des_read_pw_string
257 # define random_key des_random_key
258 # define pcbc_encrypt des_pcbc_encrypt
259 # define set_key des_set_key
260 # define key_sched des_key_sched
261 # define ecb_encrypt des_ecb_encrypt
262 # define cbc_encrypt des_cbc_encrypt
263 # define ncbc_encrypt des_ncbc_encrypt
264 # define xcbc_encrypt des_xcbc_encrypt
265 # define cbc_cksum des_cbc_cksum
266 # define quad_cksum des_quad_cksum
267 # define check_parity des_check_key_parity
271 #define des_fixup_key_parity des_set_odd_parity