encrypt: datasize not multiple of blocksize (16 bytes) at /usr/local/lib/perl5/site_perl/5.8.3/Crypt/OpenPGP/CFB.pm line 59.
####
#!/usr/local/bin/perl -w
use Crypt::OpenPGP;
# slurp in file of ciphertext:
open( my $fh, "/home/nobody/tools/crypt/cipher.txt") or die "flaming death\n";
my $Data = do { local( $/ ) ; <$fh> } ;
my $pgp = Crypt::OpenPGP->new (
"SecRing" => "/home/nobody/.keys/secring.skr"
);
my $plaintext = $pgp->decrypt (
"Compat" => "PGP5",
"Data" => $Data,
"Passphrase" => "no, you cant have it"
);
die "Decryption Failed: ", $pgp->errstr unless $plaintext;
print "plain text:\n" . $plaintext . "\n";
####
my $pgp = Crypt::OpenPGP->new (
"PubRing" => $PubRing
);
my $ciphertext = $pgp->encrypt (
"Compat" => $Compat,
"Data" => $Data,
"Recipients" => @recipients_list,
"Armour" => $Armour,
);
die "Encryption failed: ", $pgp->errstr unless $ciphertext;
return $ciphertext;