GnuPG
view release on metacpan or search on metacpan
EOF
tie *CIPHER, 'GnuPG::Tie::Encrypt', homedir => "test",
recipient => 'GnuPG', armor => 1, trace => $ENV{TRACING};
print CIPHER $plaintext;
local $/ = undef;
my $cipher = <CIPHER>;
close CIPHER;
untie *CIPHER;
local $/ = "";
tie *TEST, 'GnuPG::Tie::Decrypt', homedir => "test", passphrase => PASSWD;
print TEST $cipher;
my @para = <TEST>;
close TEST;
untie *TEST;
my $count = @para;
die "paragraph count should be 3: $count\n" unless $count == 3;
die "plaintext doesn't match input\n" unless join( "", @para) eq $plaintext;
( run in 0.248 second using v1.01-cache-2.11-cpan-3b35f9de6a3 )