4 // Because of the way that non multiple of 8
5 // buffers are handled, the decryptor must
6 // be fed buffers of the same size as the
10 // If the length is not a multiple of 8, I encrypt
11 // the overflow to be compatible with lacy's cryptlib
13 desCBCencrypt(uchar *p, int len, DESstate *s)
17 for(; len >= 8; len -= 8){
20 for(eip = ip+8; ip < eip; )
22 block_cipher(s->expanded, p, 0);
23 memmove(s->ivec, p, 8);
29 block_cipher(s->expanded, ip, 0);
30 for(eip = ip+len; ip < eip; )
36 desCBCdecrypt(uchar *p, int len, DESstate *s)
41 for(; len >= 8; len -= 8){
43 block_cipher(s->expanded, p, 1);
46 for(eip = ip+8; ip < eip; ){
54 block_cipher(s->expanded, ip, 0);
55 for(eip = ip+len; ip < eip; )