1Net::SSH::Perl::Key::DSUAs(e3r)Contributed Perl DocumentNaetti:o:nSSH::Perl::Key::DSA(3)
2
3
4
6 Net::SSH::Perl::Key::DSA - DSA key object
7
9 use Net::SSH::Perl::Key;
10 my $key = Net::SSH::Perl::Key->new('DSA');
11
13 Net::SSH::Perl::Key::DSA subclasses Net::SSH::Perl::Key to implement a
14 key object, SSH style. This object provides all of the methods needed
15 for a DSA key object; the underlying implementation is provided by
16 Crypt::DSA, and this class wraps around that module to provide SSH-spe‐
17 cific functionality (eg. taking in a Net::SSH::Perl::Buffer blob and
18 transforming it into a key object).
19
21 Net::SSH::Perl::Key::DSA implements the interface described in the doc‐
22 umentation for Net::SSH::Perl::Key. Any differences or additions are
23 described here.
24
25 $key->sign($data)
26
27 Wraps around Crypt::DSA::sign to sign $data using the private key por‐
28 tions of $key, then encodes that signature into an SSH-compatible sig‐
29 nature blob.
30
31 Returns the signature blob.
32
33 $key->verify($signature, $data)
34
35 Given a signature blob $signature and the original signed data $data,
36 attempts to verify the signature using the public key portion of $key.
37 This wraps around Crypt::DSA::verify to perform the core verification.
38
39 $signature should be an SSH-compatible signature blob, as returned from
40 sign; $data should be a string of data, as passed to sign.
41
42 Returns true if the verification succeeds, false otherwise.
43
45 Please see the Net::SSH::Perl manpage for author, copyright, and
46 license information.
47
48
49
50perl v5.8.8 2003-12-03 Net::SSH::Perl::Key::DSA(3)