Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The code is simple enough and seems to work just fine,
my $cipher = Crypt::CBC->new( -key => $key, -cipher => $cipher1, -header => 'none', -iv => $keyIV, -literal_key => 1, ); my $encrypted = $cipher->encrypt_hex($plaintext); my $decrypted = $cipher->decrypt_hex($encrypted);
My problem is that while I can encode and decode, the sample from the customer does decode properly at all. What I get is a lot of crazy characters that look like encoded data that hasn't been hex encoded.
My encrypted string is also quite a bit shorter than the sample supplied, so I'm wondering if it's a 128 versus 256 bit encoding issue?
If so, how do I force Crypt::CBC to use 256 bit?
Here's a sample of the output:
http://cgi.audioasylum.com/util/testcbc.pl
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 256 bit AEC encryption using Crypt::CBC
by Khen1950fx (Canon) on Dec 18, 2009 at 00:41 UTC | |
by Anonymous Monk on Dec 18, 2009 at 23:24 UTC | |
by Khen1950fx (Canon) on Dec 19, 2009 at 07:50 UTC |