The following works fine (make sure the data does NOT have a '0x' prefix)
our $cipher = Crypt::CBC->new( -key => 'lkasdjf34509340#@$JG', -cipher => 'Blowfish' ); #================================================== sub encrypt; sub decrypt; #================================================== #------------------- sub encrypt { my $text = shift; my $ciphertext = $cipher->encrypt_hex($text); return $ciphertext; } #------------------- sub decrypt { my $ciphertext = shift; return($cipher->decrypt( pack("H*", $ciphertext) )); }
In reply to Re: Crypt CBC
by jfroebe
in thread Crypt CBC
by perlsameer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |