Signature Failed: No secret keyrings
use strict; use warnings; use Crypt::OpenPGP; use Crypt::OpenPGP::Certificate; use Crypt::OpenPGP::Key::Secret; my $pgp = Crypt::OpenPGP->new; my $message_body; $message_body .= $_ while <STDIN>; my $result = $pgp->handle( Data => $message_body ); my $file = 'really-from-me.txt'; my $key_id = '1234567890'; my $pass = 'foo bar'; my $sec = Crypt::OpenPGP::Key::Secret->new("DSA"); my $certpass = "asd123"; my $seccert = Crypt::OpenPGP::Certificate->new( Key => $sec, Passphrase => $certpass, Version => 4, ) || die "Certificate Failed: ",$pgp->errstr; my $signature = $pgp->sign( Data => $seccert, KeyID => $key_id, Passphrase => $pass, Detach => 1, Armour => 1, ) || die "Signature Failed: ",$pgp->errstr; my $ciphertext = $pgp->encrypt( Filename => $file, Recipients => $key_id, Armour => 1, ) || die "Encryption Failed: ",$pgp->errstr; my $a = $ciphertext; print $a;
In reply to generate pgp5 code Crypt::OpenPGP by pentanol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |