Darren Chamberlain > Template-Plugin-GnuPG-0.01 > Template::Plugin::GnuPG

Download:
Template-Plugin-GnuPG-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

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 ^

SEE ALSO ^

Template::Plugin::Filter, GnuPG

syntax highlighting: