How to send passphrase to gpg with symetric encryption?

Thomas Braun Wegasoft Support <>
Tue Oct 22 09:10:02 2002

Hi ,

> On Thu Oct 17 2002; 14:44, Thomas Braun wrote:

>> del test.gpg
>> ECHO 1234 | gpg -c -v -v --cipher-algo BLOWFISH --passphrase-fd 0 test.txt
> Hmm, for me it works. Maybe the shell adds a newline character to the
> echo and this means the passphrase is *not* 1234 but 1234\n. I guess
> it's the standard Windows behave of ECHO.

Most likely you are right.

I tried various possible things and found the following to be working:

I put the passphrase into pass.txt and changed the batch to the

TYPE pass.txt | gpg -c --passphrase-fd 0 test.txt

I'm aware that this is not a very secure solution but I'm only
experimenting at the moment because I'm not sure how to pass the
passphrase to gpg from a program that is used in a web application.

Thomas Braun