entering both, password and message via standard input

View: New views
1 Messages — Rating Filter:   Alert me  

entering both, password and message via standard input

by Christoph Anton Mitterer-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.


_______________________________________________
Gnupg-users mailing list
Gnupg-users@...
http://lists.gnupg.org/mailman/listinfo/gnupg-users