GPG encrypting form data

Neil Williams linux at codehelp.co.uk
Thu Feb 12 09:21:47 CET 2004


On Thu, Feb 12, 2004 at 09:01:50AM -0000, Dee Lowndes wrote:
> > On Wed, Feb 11, 2004 at 10:47:37PM -0000, Dee Lowndes wrote:
> > > Hi All,
> > >
> > Which language? Perl can do this via GnuPG::Interface, PHP can also do
> 
> I am just trying to encode a string with a shell script first but I
> can't seem to find the right options to allow it, as it always seems to
> be expecting a file any ideas?
> 

Via bash, you can just do:
echo "test text" | gpg -a -r 0x28bcb3e3 -e

That will output an ASCII armoured block to STDOUT - in this case, the
screen. You can pipe this to another command or to a file.

echo "test text" | gpg -a -r 0x28bcb3e3 -e | mail user
echo "test text" | gpg -a -r 0x28bcb3e3 -e > newfile
echo "test text" | gpg -a -r 0x28bcb3e3 -e >> appendedfile

Replace echo "" with the command/script that generates the output to be
encrypted. Anything the GnuPG can encrypt will do fine.

-- 

Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : /pipermail/attachments/20040212/10a7a3e2/attachment.bin


More information about the Gnupg-users mailing list