summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/des/cfb_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/des/cfb_enc.c')
-rw-r--r--src/lib/libcrypto/des/cfb_enc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/libcrypto/des/cfb_enc.c b/src/lib/libcrypto/des/cfb_enc.c
index 342e785691..cca34dd7c5 100644
--- a/src/lib/libcrypto/des/cfb_enc.c
+++ b/src/lib/libcrypto/des/cfb_enc.c
@@ -64,14 +64,8 @@
64 * the second. The second 12 bits will come from the 3rd and half the 4th 64 * the second. The second 12 bits will come from the 3rd and half the 4th
65 * byte. 65 * byte.
66 */ 66 */
67void des_cfb_encrypt(in, out, numbits, length, schedule, ivec, enc) 67void des_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
68unsigned char *in; 68 long length, des_key_schedule schedule, des_cblock *ivec, int enc)
69unsigned char *out;
70int numbits;
71long length;
72des_key_schedule schedule;
73des_cblock (*ivec);
74int enc;
75 { 69 {
76 register DES_LONG d0,d1,v0,v1,n=(numbits+7)/8; 70 register DES_LONG d0,d1,v0,v1,n=(numbits+7)/8;
77 register DES_LONG mask0,mask1; 71 register DES_LONG mask0,mask1;
@@ -96,7 +90,7 @@ int enc;
96 mask1=0x00000000L; 90 mask1=0x00000000L;
97 } 91 }
98 92
99 iv=(unsigned char *)ivec; 93 iv = &(*ivec)[0];
100 c2l(iv,v0); 94 c2l(iv,v0);
101 c2l(iv,v1); 95 c2l(iv,v1);
102 if (enc) 96 if (enc)
@@ -163,7 +157,7 @@ int enc;
163 out+=n; 157 out+=n;
164 } 158 }
165 } 159 }
166 iv=(unsigned char *)ivec; 160 iv = &(*ivec)[0];
167 l2c(v0,iv); 161 l2c(v0,iv);
168 l2c(v1,iv); 162 l2c(v1,iv);
169 v0=v1=d0=d1=ti[0]=ti[1]=0; 163 v0=v1=d0=d1=ti[0]=ti[1]=0;