NAME
Template::Plugin::GnuPG -- A simple encryption plugin
SYNOPSIS
[% USE GnuPG %]
[% FILTER $GnuPG recipient = '0xb56165aa' armor = 1 %]
Your new password is 'password'.
[% END %]
DESCRIPTION
Template::Plugin::GnuPG provides a simple way to encrypt text through gnupg, using Francis J. Lacoste's GnuPG module. The resulting text is encrypted to the key specified by the recipient parameter to the FILTER.
Template::Plugin::GnuPG takes all of the configuration parameters that GnuPG takes; pass constructor parameters as name = value pairs to the USE line, and all other parameters as name = value pairs to the FILTER call:
[% USE GnuPG gnupg_path = '/opt/bin/gpg' trace = 1 %]
[% FILTER $GnuPG recipient = "mom@example.com" armor = 1 %]
The recipe for Neiman-Marcus cookies is:
[% recipe %]
[% END %]
The recipient parameter can be a keyid (like 0xB56165AA) or an email address. You can also specify symmetric encryption by passing the symmetric key with a true value (in this case, GnuPG makes you specify a passphrase with the passphrase option).
Output is ASCII armored by default, unless you pass an explicit armor = 0 to the FILTER call:
[% text | $GnuPG symmetric = 1 passphrase = pw armor = 0 %]
TODO
Add a reasonable way to sign as well. You can currently sign like so:
[% FILTER $GnuPG recipient = 'foo@example.com' sign = 1 passphrase = pw %]where
pwis the passphrase for your key (the signing key). That's pretty ugly, though; who wants their passphrase in the source templates?Better documentation
More tests.
SEE ALSO
Template::Plugin::Filter, GnuPG
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 140:
 You forgot a '=back' before '=head1'