displaying decrypted plaintext on screen instead of output to file

vedaal at nym.hush.com vedaal at nym.hush.com
Thu Sep 8 23:26:51 CEST 2011


On Thu, 08 Sep 2011 17:02:07 -0400 Jean-David Beyer 
<jeandavid8 at verizon.net> wrote:
>vedaal at nym.hush.com wrote:
>> On Thu, 08 Sep 2011 16:33:38 -0400 Daniel Kahn Gillmor 
>> <dkg at fifthhorseman.net> wrote:
>> 
>>> Alternately, you could feed your data directly on stdin from 
>the 
>>> command
>>> line with a pipe, like this:
>>>
>>> printf "just a test" | gpg --encrypt --armor -r $recipient
>> 
>> Thanks!
>> worked perfectly.
>> 
>Why send it to me encrypted, when I you did not use my public key 
>to
>encrypt it? Alternatively, you need to send me your private key. 
>You
>would be an idiot to send anyone your private key.

-----

It was just to see if gnupg could encrypt the plaintext as input on 
the screen, and showing that DGK' suggestion worked, so I encrypted 
it to a testkey.

The same principle works very easily with:

$ printf "just a test" | gpg -c -a -o filesave.asc

or

$ printf "just a test" | gpg -a -r yourkey -o filesave.asc

which is something I would not have known before DGK's suggestion.

vedaal




More information about the Gnupg-users mailing list