Script with sensitive info

Mads Laursen
Thu Jul 24 14:51:01 2003

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 24/07/03 08.13, wrote:
>    From: "James R. Hendrick" <>
>    Date: Wed, 23 Jul 2003 16:41:50 -0400
>    You *can* require that a human input that key when the script
>    starts up (maybe once per system boot). This still requires the key
>    stay in memory in the clear (better than disk, but still possible
>    to access).
> I like this idea.  So let me ask a simpler question (I'm a complete
> PGP/Gnupg novice): is there a good way to use Gnupg from within a Perl
> script to encrypt and decrypt a text string based on a user-supplied
> password?

If your script has the passphrase available in memory, you can use the
--passphrase-fd option to supply the passphrase to gpg.

For more info, see the "decrypt stdin with passphrase in" from the
beginning of this month.


Common sense is the collection of prejudices acquired by age eighteen.
                -- Albert Einstein

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.1 (GNU/Linux)