use Modern::Perl; use Crypt::CBC; my $cipher1 = Crypt::CBC->new( -key => 'my secret key', -cipher => 'Crypt::DES', -header => 'randomiv', ); my $plaintext = 'In nova fert animus mutatas dicere formas corpora; di, coeptis (nam vos mutastis et illas) adspirate meis primaque ab origine mundi ad mea perpetuum deducite tempora carmen!'; my $ciphertext = $cipher1->encrypt_hex($plaintext); say $ciphertext; my $cipher2 = Crypt::CBC->new( -key => 'my secret key', -cipher => 'Crypt::DES', #-header => 'randomiv', ); $plaintext = $cipher2->decrypt_hex($ciphertext); say $plaintext; #### $plaintext = $cipher2->decrypt_hex($ciphertext);