in reply to Crypt CBC
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Crypt CBC
by perlsameer (Initiate) on Jul 16, 2008 at 13:39 UTC | |
by jettero (Monsignor) on Jul 16, 2008 at 14:04 UTC | |
by perlsameer (Initiate) on Jul 16, 2008 at 13:55 UTC |