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

AUTHOR

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

SEE ALSO

90       Crypt::RSA::Key(3), Crypt::RSA::Public(3)
91
92
93
94perl v5.34.0                      2022-01-21       Crypt::RSA::Key::Private(3)
Impressum