Deprecated.
NAME
GnuPG::Crypticle - (DEPRECATED) use GnuPG::Interface instead!
VERSION
version 0.023
SYNOPSIS
Stop reading here, and go use GnuPG::Interface instead.
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');
...
DEPRECATION
This module should be considered deprecated and unmaintained. It was a stop-gap -- albeit not a very good one -- when the author had no better option to use gpg2 (GnuPG only works with gpg1). GnuPG::Interface is a much better option. Please use that module instead!
ATTRIBUTES
gpg_bin
full path to gpg binary
gpg_home
location of the .gnupg directory gpg should use
gpg_pass_file
plaintext file containing the passphrase used with any secret keys
gpg_temp_home
path to use as temporary home
METHODS
Parameters are passed to all methods as a key/value list (hash) e.g.,
subroutine(key1 => val1, key2 => val2);
BUILD
During object initialization, copies of master gpg keyrings are made in a temporary directory to prevent locking and corruption problems. A restart of the application is necessary if there are key ring changes. Dies on failure.
decrypt
Encrypts from a source to destination file. Croaks on decryption failure, including signature failure.
parameters:
- src
-
file name or handle to be decrypted
- dst
-
file name or handle to which decrypted output is sent
returns:
valid signature if present, or true
encrypt
Dies on failure
parameters:
- src
-
file name or handle to be encrypted
- dst
-
file name or handle to which encrypted output is sent
- gpg_args
-
arguments passed directly to gpg execution
returns:
valid signature if present, or true
detect_encryption
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.
parameters:
- file
-
file name or handle from which to detect encryption
call_gpg
(private) calls gpg command with necessary options
_open_passphrase_file
(private) Opens the passphrase file.
_open_dev_null
(private) returns a filehandle to /dev/null
SEE ALSO
This should be read "see instead." GnuPG::Interface
AUTHOR
Brad Barden <b at 13os.net>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2016 by Brad Barden.
This is free software, licensed under:
The ISC License