my $encrypted = $cipher->encrypt_hex($user_string); my $decrypted = $cipher->decrypt_hex($encrypted); print $encrypted, "\n\n"; print $decrypted, "\n\n"; if ( $user_string eq $decrypted ) { print "Good!\n"; }