80 #ifdef POK_NEEDS_PROTOCOLS_DES
84 #ifdef CBC_ENC_C__DONT_UPDATE_IV
85 void DES_cbc_encrypt(
const unsigned char *in,
unsigned char *out,
long length,
88 void DES_ncbc_encrypt(
const unsigned char *in,
unsigned char *out,
long length,
92 register DES_LONG tin0,tin1;
93 register DES_LONG tout0,tout1,xor0,xor1;
94 register long l=length;
104 for (l-=8; l>=0; l-=8)
108 tin0^=tout0; tin[0]=tin0;
109 tin1^=tout1; tin[1]=tin1;
110 DES_encrypt1((DES_LONG *)tin,_schedule,DES_ENCRYPT);
111 tout0=tin[0]; l2c(tout0,out);
112 tout1=tin[1]; l2c(tout1,out);
116 c2ln(in,tin0,tin1,l+8);
117 tin0^=tout0; tin[0]=tin0;
118 tin1^=tout1; tin[1]=tin1;
119 DES_encrypt1((DES_LONG *)tin,_schedule,DES_ENCRYPT);
120 tout0=tin[0]; l2c(tout0,out);
121 tout1=tin[1]; l2c(tout1,out);
123 #ifndef CBC_ENC_C__DONT_UPDATE_IV
133 for (l-=8; l>=0; l-=8)
135 c2l(in,tin0); tin[0]=tin0;
136 c2l(in,tin1); tin[1]=tin1;
137 DES_encrypt1((DES_LONG *)tin,_schedule,DES_DECRYPT);
147 c2l(in,tin0); tin[0]=tin0;
148 c2l(in,tin1); tin[1]=tin1;
149 DES_encrypt1((DES_LONG *)tin,_schedule,DES_DECRYPT);
152 l2cn(tout0,tout1,out,l+8);
153 #ifndef CBC_ENC_C__DONT_UPDATE_IV
158 #ifndef CBC_ENC_C__DONT_UPDATE_IV
164 tin0=tin1=tout0=tout1=xor0=xor1=0;