Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

dlc (50)

dlc
  {dlc} {at} {sevenroot.org}
http://sevenroot.org/dlc/
AOL IM: fcd1ce2cae0cd125 (Add Buddy, Send Message)

PAUSE-ID: DARREN [cpan.org]

Journal of dlc (50)

Monday October 11, 2004
08:19 PM

Template::Plugin::GnuPG -- PGP encrypt your TT output

[ #21299 ]

I recently released Template::Plugin::GnuPG, which integrates the Template Toolkit and gnupg via the GnuPG module. I wrote it (over the course of an hour or so) because I had an odd need: I needed to encrypt the body of a web page to a specific GPG key. The encrypted page is simply a PGP message (with the -----BEGIN PGP MESSAGE-----) wrapped in headers and footers.

Because no browser supports PGP-encrypted content (though they should!), there are a couple of ways to view the content. The first is to use something that can decrypt the contents of a window, such as WinPT (if you're using windows). Since WinPT doesn't run on my OS of choice, I would most likely do something like:

$ wget -qO- http://example.com/encrypted.html | gpg --output - | lynx -force_html -stdin

(Though that would run any formatting within the encrypted part of the document.)

Anyway, it will be interesting to see if anyone else has a use for this plugin. I can see it being useful for automatically generated email, in addition to web pages, but I don't know how often people have a need to do this kind of thing.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.