use Crypt::CBC; $cipher = Crypt::CBC->new( { key => 'SomeSecretKeyHere', cipher => 'Rijndael', }); my $source_text = "This data is hush hush"; my $cipher_text = unpack('H*', $cipher->encrypt($source_text)); my $decrypted = $cipher->decrypt(pack('H*', $cipher_text));