Mail::GPG::Result - Mail::GPG decryption and verification results
$result = $mg->verify ( entity => $entity ); ($decrypted_entity, $result) = $mg->decrypt ( entity => $entity, ); $long_string = $result->as_string ( ... ); $short_string = $result->as_short_string; $encrypted = $result->get_is_encrypted; $decryption_ok = $result->get_enc_ok; $encryption_key_id = $result->get_enc_key_id; $trust = $result->get_enc_trust; $encryption_mail = $result->get_enc_mail; $signed = $result->get_is_signed; $signature_ok = $result->get_sign_ok; $signed_key = $result->get_sign_key_id; $trust = $result->get_sign_trust; $signed_mail = $result->get_sign_mail; $signed_mail_aliases = $result->get_sign_mail_aliases; $stdout_sref = $result->get_gpg_stdout; $stderr_sref = $result->get_gpg_stderr; $gpg_exit_code = $result->get_gpg_rc;
This class encapsulates decryption and verification results of Mail::GPG. You never create objects of this class yourself, they're all returned by Mail::GPG.
This class mainly has a bunch of attributes which reflect the result of a Mail::GPG operation. You can read these attributes with get_attribute.
Indicates whether an entity was encrypted or not.
Indicates whether decryption of an entity was successful or not.
The key ID of the sender who encrypted an entity.
Returns how much you trust the encrypter's key. Refer to Mail::GPG->get_key_trust for a list of known levels and their meaning.
The mail address of the sender who encrypted an entity.
Indicates whether an entity was signed or not.
Indicates whether the signature could be verified successfully or not.
The key ID of the sender who signed an entity.
Returns how much you trust the signers key. Refer to Mail::GPG->get_key_trust for a list of known levels and their meaning.
The primary mail address of the sender who signed an entity.
A reference to a list of the signer's mail alias addresses.
This is reference to a scalar containing gpg's STDOUT output.
This is reference to a scalar containing gpg's STDERR output.
Exit code of the gpg program.
There are only two methods, both are for debugging purposes:
$string = $result->as_string ( no_stdout => $no_stdout )
Returns a printable string version of the object.
If this option is set, gpg's stdout is ommitted in the string represenation.
$short_string = $result->as_short_string;
Returns a very short string representation, without any gpg output, arranged in one line.
Joern Reder <joern AT zyn.de>
Copyright (C) 2004 by Joern Reder, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Mail::GPG, perl(1).
To install Mail::GPG, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::GPG
CPAN shell
perl -MCPAN -e shell install Mail::GPG
For more information on module installation, please visit the detailed CPAN module installation guide.