NAME

Crypt::SimpleGPG - easy encryption and decryption using GPG

SYNOPSIS

Encrypting

my $gpg = Crypt::SimpleGPG->new(home_dir = '/home/user/.gnupg');
$gpg->import_key('/path/to/public/key');
my $ciphertext = $gpg->encrypt($plaintext, $recipient);

Decrypting

my $gpg = Crypt::SimpleGPG->new(home_dir = '/home/user/.gnupg');
$gpg->import_key('/path/to/private/key');
my $plaintext = $gpg->decrypt($ciphertext, $passphrase);

NOTES

home_dir will default to /var/tmp/gnupg if not specified in the constructor. You probably don't want this, but it might be okay if you're only using public keys.

temp_dir will be used to store temporary files when decrypting using a passphrase.

COPYRIGHT

Copyright (c) 2010 Corey Cossentino

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.