encrypting and signing a file without a passphrase

Josh Huber Josh Huber <huber+dated+1045273022.57f87c@alum.wpi.edu>
Mon Feb 10 02:36:01 2003


"Steve Kwong" <stevek@intergate.bc.ca> writes:

> I read about --passphrase-fd n, but I do not know what value to
> specify for the file descriptor.  If I have a temporary file called,
> pswd.txt, containing the passphrase, what value do I specify for the
> file descriptor, and how will gpg know the name of the file it needs
> to read to get the passphrase.

A couple ways:

echo "passphrase" | gpg --passphrase-fd 0 --sign ...

or

cat pswd.txt | gpg --passphrase-fd 0 --sign ...

-- 
Josh Huber