syntax for encrypting only the string passed in an argument

Brian Mearns mearns.b at gmail.com
Fri Apr 17 13:18:59 CEST 2009


On Thu, Apr 16, 2009 at 3:38 AM, Incomex <incomex at hotmail.com> wrote:
>
> I want to be able to call a shell from within a development environment
> and pass a string of data to it to be de/en/crypted.  The idea would look
> like
> this:
>
> read from file "data.txt" line z and put it into variableY
> variablex = call shell(gpg -e -r Joe variableY)
> print variablex
>
> rem:  variableY is the plaintext, variablex is the returned cyphertext
>
> you can email me directly at incomex at hotmail.com
> thanks
> --
> View this message in context: http://www.nabble.com/syntax-for-encrypting-only-the-string-passed-in-an-argument-tp23072963p23072963.html
> Sent from the GnuPG - User mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>

Does you "development environment" allow you to feed things to stdin?
Because that's how gpg would normally expect to receive the text, if
an input file is not specified. I don't know whether or not there's a
way to specify the text directly in an argument (seems very unlikely,
most plaintext would be difficult to escape for use on a command
line). Depending on how the shell function commands, you might be able
to do it directly from there, e.g., `cat myfile | gpg -e -r joe`.

-Brian

-- 
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net



More information about the Gnupg-users mailing list