entering both, password and message via standard input

Christoph Anton Mitterer christoph.anton.mitterer at physik.uni-muenchen.de
Fri Oct 30 15:10:09 CET 2009


Hi.

I have a case where I need to enter both, the passphrase and a message  
(that should be decrypted), via standard input.
(Well, in principle it another non-interactive way for the passphrase  
would be ok, too, but not --passphrase-fd and neither --passphrase  
string).

It seems that the following works:
printf "%s\n%s" $passphrase $message | gpg --passphrase-fd 0 --decrypt
So I assume the first line is taken as passphrase, removed, and  
everything else as the message.

Is this the intended behaviour and is it kept like that in future  
versions,.. or is it just working like that "by accident"?

Should I add other options, like --batch or --no-tty?


Thanks,
Chris.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the Gnupg-users mailing list