use Crypt::CBC; use strict; my $cipher = Crypt::CBC->new( { 'key' => 'a' x 32, # change this to a decent key with 32 chars 'cipher' => 'Rijndael', 'iv' => 'm_?.5fP}', 'regenerate_key'=> 0, 'padding' => 'space', 'prepend_iv' => 0 } ); my $data_to_encrypt = 'what\'s up, doc ?'; my $cipheredtext = $cipher->encrypt($data_to_encrypt); print "ciphered : $cipheredtext \n"; my $plaintext = $cipher->decrypt($cipheredtext); print "plaintext : $plaintext\n"; $cipher->finish;