On 02/11/2008 03:30 PM, Dave (My-IOP) wrote:
Hi,
I want to pass clear text from a text editor to gpg for encryption (on a Linux system). Currently it is being done by writing the clear text to a temp file and having gpg read that temp file and then write it back out as an encrypted file. Obviously, it would be much better to avoid ever writing the clear text to disk.

How can I pass the clear text to gpg via a pipe and avoid using the temp file on disk?

I am a noob (to both Linux and gpg), so a very clear example is greatly appreciated.


Well, it really depends a lot on your text editor. I use Vim, so my command is

gg!Ggpg -ae -r [EMAIL PROTECTED]

That goes to the beginning of the file and filters all the text through the the process gpg -ae -r [EMAIL PROTECTED]

As for how to do it under Emacs, I'm sure another of these fine people can help. Also, if security is important, you'll want to make sure that any hard drive writes or backups are disabled. In Vim, you'll want to turn off the scratch file.

Hope that helps,

Luke Powell


_______________________________________________
Gnupg-users mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to