5 // Because of the way that non multiple of 8
6 // buffers are handled, the decryptor must
7 // be fed buffers of the same size as the
11 // If the length is not a multiple of 8, I encrypt
12 // the overflow to be compatible with lacy's cryptlib
14 desCBCencrypt(uchar *p, int len, DESstate *s)
18 for(; len >= 8; len -= 8){
21 for(eip = ip+8; ip < eip; )
23 block_cipher(s->expanded, p, 0);
24 memmove(s->ivec, p, 8);
30 block_cipher(s->expanded, ip, 0);
31 for(eip = ip+len; ip < eip; )
37 desCBCdecrypt(uchar *p, int len, DESstate *s)
42 for(; len >= 8; len -= 8){
44 block_cipher(s->expanded, p, 1);
47 for(eip = ip+8; ip < eip; ){
55 block_cipher(s->expanded, ip, 0);
56 for(eip = ip+len; ip < eip; )