Chris Ball > PGP-FindKey > PGP::FindKey

Download:
PGP-FindKey-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

PGP::FindKey - Perl interface to finding PGP keyids from e-mail addresses.

SYNOPSIS ^

  use PGP::FindKey; 
  $obj = new PGP::FindKey
        ( 'keyserver'   => 'keyserver.pgp.com', 
          'address'     => 'remote_user@their.address' );
  die( "The key could not be found, or there was one than one match.\n" ) unless defined($obj);

  print $obj->result;   # the keyid found. 
  print $obj->name;     # the name associated with the key.

  # We could call `gpg --recv-key $obj->result` here.

DESCRIPTION ^

Perl interface to finding PGP keyids from e-mail addresses.

METHOD ^

new - Creates a new PGP::FindKey object. Parameters:

  address:   (mandatory) E-mail address to be translated.
  keyserver: Default to 'keyserver.pgp.com'.
  path:      Default to '/pks/lookup?'.
  command:   Default to '?op=index&search='.

NOTES ^

The module will return undef if more than one key is present for an address. This is because that we - or indeed, the user - have no way of knowing which key they're after in this case, and it would be a bad idea to encourage them to encrypt to a random public key. This limitation will be addressed when a $want_array param is implemented, and the choice can be given to the user if required.

TODO ^

Plenty of things: \- More information about the key found. \- More meaningful error reporting. \- Other mechanisms. $want_array param, more OO.

AUTHOR ^

Chris Ball <chris@cpan.org>

SEE ALSO ^

perl(1).

syntax highlighting: