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 for $obj->address. 

DESCRIPTION

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

METHODS

new

Creates a new PGP::FindKey object. Parameters:

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

NOTES

The module will return undef if more than one key is present for an address. Quite simply, this is because not verifying the authenticity of the public key in this case would be foolish.

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).