Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: GPG decryption

by Paladin (Vicar)
on Jan 22, 2003 at 21:34 UTC ( [id://229138]=note: print w/replies, xml ) Need Help??


in reply to GPG decryption

According to the docs for GPG, decrypt_verify() and friends take the actual text as the second argument, not a file name. Try:
... open GPGFILE, "try.gpg" or die "Couldn't open try.gpg: $!"; my $text = do {local $/; <GPGFILE>}; close GPGFILE; my $file=$gpg->decrypt_verify($passphrase,$text); print $file->{text}; ...

Replies are listed 'Best First'.
Re: Re: GPG decryption
by chinesebob (Initiate) on Jan 23, 2003 at 12:02 UTC
    Instead of using the module I tried the
    system(gpg ......);
    and it worked. Go figure. thank you anyways.
Re^2: GPG decryption
by snookmz (Beadle) on Nov 16, 2004 at 21:28 UTC
    I was racking my brain trying to work out why:

    $gpg->decrypt(pass,$text)

    wasn't working for $text

    The GPG pod wasn't clear to me on this issue, thanks for clearing it up for us Paladin :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://229138]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-19 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found