Why do you pack and unpack the ciphertext by hand? Why not use encrypt_hex() and decrypt_hex()? I suspect your problem is with the pack()/unpack() not with CBC.
When you say, unpack("H16", "a" x 27); you only unpack the first 16 bytes, or words or something like that. I think you want unpack("H*", $ciphertext); but more than that, I think you want $cipher->encrypt_hex($plaintext);
-Paul
In reply to Re: Crypt CBC
by jettero
in thread Crypt CBC
by perlsameer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |