View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Darren Chamberlain > Template-Plugin-GnuPG > Template::Plugin::GnuPG



Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  


Template::Plugin::GnuPG -- A simple encryption plugin


    [% USE GnuPG %]
    [% FILTER $GnuPG recipient = '0xb56165aa' armor = 1 %]
    Your new password is 'password'.
    [% END %]


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 = "" 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 %]



Template::Plugin::Filter, GnuPG

syntax highlighting: