| // Because of the way that non multiple of 8 |
| // buffers are handled, the decryptor must |
| // be fed buffers of the same size as the |
| // If the length is not a multiple of 8, I encrypt |
| // the overflow to be compatible with lacy's cryptlib |
| desCBCencrypt(uchar *p, int len, DESstate *s) |
| for(; len >= 8; len -= 8){ |
| for(eip = ip+8; ip < eip; ) |
| block_cipher(s->expanded, p, 0); |
| block_cipher(s->expanded, ip, 0); |
| for(eip = ip+len; ip < eip; ) |
| desCBCdecrypt(uchar *p, int len, DESstate *s) |
| for(; len >= 8; len -= 8){ |
| block_cipher(s->expanded, p, 1); |
| for(eip = ip+8; ip < eip; ){ |
| block_cipher(s->expanded, ip, 0); |
| for(eip = ip+len; ip < eip; ) |