|
Crypt::RSA::Key - RSA Key Pair Generator. |
Crypt::RSA::Key - RSA Key Pair Generator.
my $keychain = new Crypt::RSA::Key;
my ($public, $private) = $keychain->generate (
Identity => 'Lord Macbeth <macbeth@glamis.com>',
Size => 2048,
Password => 'A day so foul & fair',
Verbosity => 1,
) or die $keychain->errstr();
This module provides a method to generate an RSA key pair.
new()Constructor.
generate()generate() generates an RSA key of specified bitsize. It returns a list of
two elements, a Crypt::RSA::Key::Public object that holds the public part
of the key pair and a Crypt::RSA::Key::Private object that holds that
private part. On failure, it returns undef and sets $self->errstr to
appropriate error string. generate() takes a hash argument with the
following keys:
generate() will draw a progress display on STDOUT.
write()
method of Crypt::RSA::Key::Public(3) and Crypt::RSA::Key::Private(3).
See ERROR HANDLING in Crypt::RSA(3) manpage.
There's an inefficiency in the way generate() ensures the key pair is
exactly Size bits long. This will be fixed in a future release.
Vipul Ved Prakash, <mail@vipul.net>
Crypt::RSA(3), Crypt::RSA::Key::Public(3), Crypt::RSA::Key::Private(3), Crypt::Primes(3), Tie::EncryptedHash(3), Class::Loader(3)
|
Crypt::RSA::Key - RSA Key Pair Generator. |