GnuPG::Crypticle - Encryption/decryption module
Version 0.01
use GnuPG::Crypticle; my $crypticle = GnuPG::Crypticle->new(gpg_home => /home/me/.gnupg); $crypticle->encrypt(src => '/tmp/sourcefile.txt', dst => '/tmp/destfile.gpg', rcpt => 'ABCD0123'); ...
full path to gpg binary
location of the .gnupg directory gpg should use
plaintext file containing the passphrase used with any secret keys
path to use as temporary home
Parameters are passed to all subroutines as a key/value list (hash) e.g.,
subroutine(key1 => val1, key2 => val2);
During object initialization, copies of master gpg keyrings are made in a temporary directory to prevent locking and corruption issues. A restart of the application is necessary if there are key ring changes. Dies on failure.
Encrypts from a source to destination file. Croaks on decryption failure, including signature failure.
parameters:
file name or handle to be decrypted
file name or handle to which decrypted output is sent
returns:
valid signature if present, or true
Dies on failure
file name or handle to be encrypted
file name or handle to which encrypted output is sent
arguments passed directly to gpg execution
Dies on failure. Detects pgp or gpg decryption the same as mime magic does.
This is nowhere near complete or reliable. For best results, just try to decrypt.
file name or handle from which to detect encryption
(private) calls gpg command with necessary options
(private) Opens the passphrase file.
Brad Barden, <iamb at mifflinet.net>
<iamb at mifflinet.net>
Please report any bugs or feature requests to Brad Barden.
You can find documentation for this module with the perldoc command.
perldoc GnuPG::Crypticle
Copyright 2012 Brad Barden.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install GnuPG::Crypticle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GnuPG::Crypticle
CPAN shell
perl -MCPAN -e shell install GnuPG::Crypticle
For more information on module installation, please visit the detailed CPAN module installation guide.