use Crypt::CBC; use MIME::Base64; my $key = '0000000123456789009876543210abcdefghijklmnopqrstuvwxyz'; my $iv = '87654321'; my $cipt = 'hED7MTyAXjY='; #encrypted string "u_ser_a" my $cmp = "u_ser_a"; $cipher = Crypt::CBC->new( -key => $key, -cipher => 'Blowfish', -iv => $iv, -header => 'none', -padding => 'standard', -literal_key => 'true', -keysize => length($key), ); $clt = $cipher->decrypt(decode_base64($cipt)); if ($cmp eq $clt) { print "correct!\n"; } else { print "not match!n"; }