in reply to Simple Crypt::CBC Sample?
I was unable to install Crypt::Random, so I can't even attempt to replicate your error.
However, if I run a modified version of your code with only Crypt::CBC, it runs for me without errors:
use warnings; use strict; use Crypt::CBC; my $key = 1; my $cipher = Crypt::CBC->new( -key => $key ); my $ciphertext = $cipher->encrypt_hex('test'); print "$ciphertext \n"; __END__ 53616c7465645f5f5847db7edbe4cfb66a7ce84481016e42
Perhaps there is a strange interaction between the 2 modules. Can you use something else to generate the key?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Simple Crypt::CBC Sample?
by boat73 (Scribe) on Feb 14, 2013 at 20:19 UTC | |
by toolic (Bishop) on Feb 14, 2013 at 20:38 UTC | |
by toolic (Bishop) on Feb 14, 2013 at 20:30 UTC |
In Section
Seekers of Perl Wisdom