#!/usr/local/bin/perl use strict; use warnings; use Crypt::CBC; my $key = 'little brown mouse'; my $cipher = Crypt::CBC->new( -key => $key, -keylength => '256', -cipher => "Crypt::OpenSSL::AES" ); my $encrypted = $cipher->encrypt_hex($key); my $decrypted = $cipher->decrypt_hex($encrypted); print $encrypted, "\n"; print $decrypted, "\n";