From de8f24ea083384bb66b32ec105dc4743c5663cdf Mon Sep 17 00:00:00 2001 From: beck <> Date: Wed, 29 Sep 1999 04:37:45 +0000 Subject: OpenSSL 0.9.4 merge --- src/lib/libcrypto/des/cfb64enc.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'src/lib/libcrypto/des/cfb64enc.c') diff --git a/src/lib/libcrypto/des/cfb64enc.c b/src/lib/libcrypto/des/cfb64enc.c index 403da479df..389a232cb3 100644 --- a/src/lib/libcrypto/des/cfb64enc.c +++ b/src/lib/libcrypto/des/cfb64enc.c @@ -63,14 +63,9 @@ * 64bit block we have used is contained in *num; */ -void des_cfb64_encrypt(in, out, length, schedule, ivec, num, enc) -unsigned char *in; -unsigned char *out; -long length; -des_key_schedule schedule; -des_cblock (*ivec); -int *num; -int enc; +void des_cfb64_encrypt(const unsigned char *in, unsigned char *out, + long length, des_key_schedule schedule, des_cblock *ivec, + int *num, int enc) { register DES_LONG v0,v1; register long l=length; @@ -78,7 +73,7 @@ int enc; DES_LONG ti[2]; unsigned char *iv,c,cc; - iv=(unsigned char *)ivec; + iv = &(*ivec)[0]; if (enc) { while (l--) @@ -87,12 +82,11 @@ int enc; { c2l(iv,v0); ti[0]=v0; c2l(iv,v1); ti[1]=v1; - des_encrypt((DES_LONG *)ti, - schedule,DES_ENCRYPT); - iv=(unsigned char *)ivec; + des_encrypt(ti,schedule,DES_ENCRYPT); + iv = &(*ivec)[0]; v0=ti[0]; l2c(v0,iv); v0=ti[1]; l2c(v0,iv); - iv=(unsigned char *)ivec; + iv = &(*ivec)[0]; } c= *(in++)^iv[n]; *(out++)=c; @@ -108,12 +102,11 @@ int enc; { c2l(iv,v0); ti[0]=v0; c2l(iv,v1); ti[1]=v1; - des_encrypt((DES_LONG *)ti, - schedule,DES_ENCRYPT); - iv=(unsigned char *)ivec; + des_encrypt(ti,schedule,DES_ENCRYPT); + iv = &(*ivec)[0]; v0=ti[0]; l2c(v0,iv); v0=ti[1]; l2c(v0,iv); - iv=(unsigned char *)ivec; + iv = &(*ivec)[0]; } cc= *(in++); c=iv[n]; -- cgit v1.2.3-55-g6feb