| // I wasn't sure what to do when the buffer was not |
| // a multiple of 8. I did what lacy's cryptolib did |
| // to be compatible, but it looks dangerous to me |
| // since its encrypting plain text with the key. -- presotto |
| des3ECBencrypt(uchar *p, int len, DES3state *s) |
| for(; len >= 8; len -= 8){ |
| triple_block_cipher(s->expanded, p, DES3EDE); |
| triple_block_cipher(s->expanded, tmp, DES3EDE); |
| for (i = 0; i < len; i++) |
| des3ECBdecrypt(uchar *p, int len, DES3state *s) |
| for(; len >= 8; len -= 8){ |
| triple_block_cipher(s->expanded, p, DES3DED); |
| triple_block_cipher(s->expanded, tmp, DES3EDE); |
| for (i = 0; i < len; i++) |