use Crypt::OpenPGP::Cipher; my $cipher = Crypt::OpenPGP::Cipher->new($name); my $ct = $cipher->encrypt($plaintext); my $pt = $cipher->decrypt($ct);