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 des3CBCencrypt(uchar *p, int len, DES3state *s)
18 for(; len >= 8; len -= 8){
21 for(eip = ip+8; ip < eip; )
23 triple_block_cipher(s->expanded, p, DES3EDE);
24 memmove(s->ivec, p, 8);
30 triple_block_cipher(s->expanded, ip, DES3EDE);
31 for(eip = ip+len; ip < eip; )
37 des3CBCdecrypt(uchar *p, int len, DES3state *s)
42 for(; len >= 8; len -= 8){
44 triple_block_cipher(s->expanded, p, DES3DED);
47 for(eip = ip+8; ip < eip; ){
55 triple_block_cipher(s->expanded, ip, DES3EDE);
56 for(eip = ip+len; ip < eip; )