Using GPG to encrypt raw data from a Perl Script

Frank Tobin ftobin@uiuc.edu
Fri Feb 23 09:02:41 2001


Ton Sistos, at 13:03 -0800 on Thu, 22 Feb 2001, wrote:

    Of course, this doesn't work; GPG never returns (although it did seem to get
    the passphrase), and the read on <README> hangs forever.  Does anyone know
    of a way to get GPG to read from my Perl script and write back to it?  I
    know that I could use temporary files to store $data and/or @result, but I'd
    like to do this without incurring a disk-access execution penalty.

First of all, you might be interested in using a CPAN module that
interfaces with GnuPG.

Second, buffering issues can prohibit sending large inputs into GnuPG.
Hook up GnuPG to an already-opened temporary file by dupping.  See
GnuPG::Interface for how this might be possible.

-- 
Frank Tobin		http://www.uiuc.edu/~ftobin/