Automated Decryption. Not JAVA PHP =)

bernardino lopez
Wed Nov 21 16:04:03 2001

I'm working in get it done with PHP !!!.

This is what I have so far 3 files required :

secret.txt.asc	= File with Encryption
demo.txt	= Output File in TXT
password	= File with the GPG Key.

[blopez@mylinux7 gpg]$

With only 1 command line:

gpg --decrypt --passphrase-fd 0 -o demo.txt
secret.txt.asc < password

gpg -d lol.asc --passphrase-fd 0 < ./password

gpg -d --passphrase-fd 0 lol.asc < ./password
gpg -d --passphrase-fd 0 lol.asc < ./password

I know this is silly, because I like to parse the
content of my key in the same time that some user is
logged in, I wish to make it on the fly but I did not
find the command to escape the input of gpg, i saw
early this morning:

echo <passphrase> | gpg --yes --passphrase-fd  --batch
 -o $2 -d $1

I'm going to play a little bit, I was thinking to use
a expect script but I'm not feel really good about the

Best Regards D1n00z.

--- Frederick Nara <> wrote:
> Helllo, 
> I've read in the faq that it was possible to  to do
> automatic signing.
> But, I couldn't manage to use a keyring to decrypt
> messages.
> So I still use the following method.  echo
> <passphrase> | gpg --yes --passphrase-fd  --batch 
> -o $2 -d $1
> Is there a more secure method?
> Thanks.
> Frederick
> _______________________________________________
> Gnupg-users mailing list

Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.