AnyEvent-GnuPG
view release on metacpan or search on metacpan
lib/AnyEvent/GnuPG.pm view on Meta::CPAN
The passphrase that should be used to decrypt the message (in the case of a message encrypted using a symmetric cipher) or the secret that will unlock the private key that should be used to decrypt the message.
=back
Example:
$gpg->decrypt(
ciphertext => "file.gpg",
output => "file.txt",
passphrase => $secret
);
=head2 decrypt_cb(%params[, cb => $callback|$condvar])
Asynchronous variant of L</decrypt>.
=head1 API OVERVIEW
The API is accessed through methods on a AnyEvent::GnuPG object which is a wrapper around the B<gpg> program. All methods takes their argument using named parameters, and errors are returned by throwing an exception (using croak). If you wan't to cat...
This modules uses L<AnyEvent::Proc>. For input data, all of L<AnyEvent::Proc/pull> and for output data, all of L<AnyEvent::Proc/pipe> possible handle types are allowed.
The code is based on L<GnuPG> with API compatibility except that L<GnuPG::Tie> is B<not> ported.
=head2 CALLBACKS AND CONDITION VARIABLES
Every method has a callback variant, suffixed with I<_cb>. These methods accept an optional parameter called I<cb>, which can be a CodeRef or an L<AnyEvent>::CondVar and returns a condvar.
$gpg->method_cb(%params, cb => sub {
my $result = shift->recv; # croaks on error
...
});
my $cv = $gpg->method_cb(%params);
my $result = $cv->recv; # croaks on error
...
The non-callback variants are all wrapper methods, looking something like this:
sub method {
shift->method_cb(@_)->recv
}
=head1 EXPORTS
Nothing by default. Available tags:
=over 4
=item * :algo
RSA_RSA DSA_ELGAMAL DSA RSA
=item * :trust
TRUST_UNDEFINED TRUST_NEVER TRUST_MARGINAL TRUST_FULLY TRUST_ULTIMATE
=back
=head1 BUGS AND LIMITATIONS
This module doesn't work (yet) with the v2 branch of GnuPG.
=head1 SEE ALSO
=over 4
=item * L<GnuPG>
=item * L<gpg(1)>
=back
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website
https://github.com/zurborg/libanyevent-gnupg-perl/issues
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=head1 AUTHORS
=over 4
=item *
Francis J. Lacoste <francis.lacoste@Contre.COM>
=item *
David Zurborg <zurborg@cpan.org>
=back
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by David Zurborg.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
=cut
( run in 2.397 seconds using v1.01-cache-2.11-cpan-63c85eba8c4 )