|
Posted by josh.kuo@gmail.com on 06/03/06 17:54
Answer my own question...
The perl Crypt::CBC documentation states that the '-regenerate_key' and
'-prepent_iv' are deprecated, that's why I used '-literal_key' instead
of '-regenerate_key'.
However, when I switch back to use the old '-regenerate_key', I got a
different error:
If specified by -literal_key, then the key length must be equal to the
chosen cipher's key length of 56 bytes at ./blow.pl line 9
So I changed my key to something like this in both perl and PHP:
my $long_key = "01234567890123456789012345678901234567890123456789"
my $key = substr($long_key, 0, 56);
And while decrypting on the PHP end, I needed to use rtrim() on the
decrypted string.
After these changes everything is working.
[Back to original message]
|