Crypt::GCrypt is a Perl interface to the GNU Cryptographic library.
$cipher = Crypt::GCrypt->new(
type => 'cipher',
algorithm => 'aes',
mode => 'cbc'
$cipher->setkey('my secret key');
$cipher->setiv('my init vector');
$ciphertext = $cipher->encrypt('plaintext');
$ciphertext .= $cipher->finish;
$plaintext = $cipher->decrypt($ciphertext);
$plaintext .= $cipher->finish;
Crypt::GCrypt provides an object interface to the C libgcrypt library. It currently supports symmetric encryption/decryption, while asymmetric cryptography is being worked on.