1Crypt::RSA::Key::PrivatUes(e3r)Contributed Perl DocumentCartyipotn::RSA::Key::Private(3)
2
3
4

NAME

6       Crypt::RSA::Key::Private -- RSA Private Key Management.
7

SYNOPSIS

9           $key = new Crypt::RSA::Key::Private (
10                       Identity => 'Lord Banquo <banquo@lochaber.com>',
11                       Password => 'The earth hath bubbles',
12                  );
13
14           $key->hide();
15
16           $key->write( Filename => 'rsakeys/banquo.private'  );
17
18           $akey = new Crypt::RSA::Key::Private (
19                        Filename => 'rsakeys/banquo.private'
20                       );
21
22           $akey->reveal ( Password => 'The earth hath bubbles' );
23

DESCRIPTION

25       Crypt::RSA::Key::Private provides basic private key management func‐
26       tionality for Crypt::RSA private keys. Following methods are available:
27
28       new()
29           The constructor. Takes a hash, usually with two arguments: "File‐
30           name" and "Password". "Filename" indicates a file from which the
31           private key should be read. More often than not, private keys are
32           kept encrypted with a symmetric cipher and MUST be decrypted before
33           use. When a "Password" argument is provided, the key is also
34           decrypted before it is returned by "new()". Here's a complete list
35           of arguments accepted by "new()" (all of which are optional):
36
37           Identity
38               A string identifying the owner of the key. Canonically, a name
39               and email address.
40
41           Filename
42               Name of the file that contains the private key.
43
44           Password
45               Password with which the private key is encrypted, or should be
46               encrypted (in case of a new key).
47
48           Cipher
49               Name of the symmetric cipher in which the private key is
50               encrypted (or should be encrypted). The default is "Blowfish"
51               and possible values include DES, IDEA, Twofish and other
52               ciphers supported by Crypt::CBC.
53
54       reveal()
55           If the key is not decrypted at "new()", it can be decrypted by
56           calling "reveal()" with a "Password" argument.
57
58       hide()
59           "hide()" causes the key to be encrypted by the chosen symmetric
60           cipher and password.
61
62       write()
63           Causes the key to be written to a disk file specified by the "File‐
64           name" argument. "write()" will call "hide()" before writing the key
65           to disk. If you wish to store the key in plain, don't specify a
66           password at "new()".
67
68       read()
69           Causes the key to be read from a disk file specified by "Filename"
70           into the object. If "Password" is provided, the method automati‐
71           cally calls reveal() to decrypt the key.
72
73       serialize()
74           Creates a Data::Dumper(3) serialization of the private key and
75           returns the string representation.
76
77       deserialize()
78           Accepts a serialized key under the "String" parameter and coverts
79           it into the perl representation stored in the object.
80
81       "check()"
82           Check the consistency of the key. If the key checks out, it sets
83           $self->{Checked} = 1. Returns undef on failure.
84

AUTHOR

86       Vipul Ved Prakash, <mail@vipul.net>
87

SEE ALSO

89       Crypt::RSA::Key(3), Crypt::RSA::Public(3)
90
91
92
93perl v5.8.8                       2007-04-17       Crypt::RSA::Key::Private(3)
Impressum