Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Here is a small test case that attempts to do the decrypt and produces the error:encrypt: datasize not multiple of blocksize (16 bytes) at /usr/local/l +ib/perl5/site_perl/5.8.3/Crypt/OpenPGP/CFB.pm line 59.
The code that did the crypting looks like this:#!/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";
Stuff I've Tried So Far: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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Crypt::OpenPGP blocksize problem
by zentara (Cardinal) on Mar 11, 2004 at 15:07 UTC | |
by frankmanowar (Initiate) on Mar 22, 2004 at 19:28 UTC | |
by zentara (Cardinal) on Mar 22, 2004 at 21:21 UTC |