rtmhal has asked for the wisdom of the Perl Monks concerning the following question:
Found the solution!
I want to encrypt a random number but I am getting the message "Taint checks are turned on and your key is tainted." I can decrypt the data that was passed in but it fails when doing the encrypt. Thanks for any help. rtmhal
if ( $key =~ /(\w+)/ ) { $key = $1; } my $cipher2 = Crypt::CBC->new( -key => $key, -cipher => 'Twofish' ); $random_integer = int(rand(100000)); ($random_integer) = $random_integer =~ /(\d+)/; $encrypted_int = $cipher2->encrypt($1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: taint when encrypting
by kennethk (Abbot) on Jul 08, 2011 at 19:21 UTC | |
by ww (Archbishop) on Jul 08, 2011 at 23:14 UTC | |
|
Re: taint when encrypting
by Anonymous Monk on May 25, 2013 at 23:11 UTC |