61 #ifndef OPENSSL_NO_DES
69 const unsigned char *iv,
int enc);
75 const unsigned char *in,
size_t inl)
83 const
unsigned char *in,
size_t inl)
100 const unsigned char *in,
size_t inl)
116 static int des_cfb64_cipher(
EVP_CIPHER_CTX *ctx,
unsigned char *out,
117 const unsigned char *in,
size_t inl)
135 static int des_cfb1_cipher(
EVP_CIPHER_CTX *ctx,
unsigned char *out,
136 const unsigned char *in,
size_t inl)
139 unsigned char c[1],d[1];
141 if (inl<chunk) chunk=inl;
143 while (inl && inl>=chunk)
145 for(n=0 ; n < chunk*8; ++n)
147 c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
150 out[n/8]=(out[n/8]&~(0x80 >> (
unsigned int)(n%8))) |
151 ((d[0]&0x80) >> (
unsigned int)(n%8));
156 if (inl<chunk) chunk=inl;
162 static int des_cfb8_cipher(
EVP_CIPHER_CTX *ctx,
unsigned char *out,
163 const unsigned char *in,
size_t inl)
191 EVP_CIPH_RAND_KEY,des_init_key,NULL,
192 EVP_CIPHER_set_asn1_iv,
193 EVP_CIPHER_get_asn1_iv,des_ctrl)
196 const
unsigned char *iv,
int enc)
199 #ifdef EVP_CHECK_DES_KEY