Greg Sabino Mullane > Net-SSH-Perl > Net::SSH::Perl::Key::DSA

Download:
Net-SSH-Perl-1.34.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  24
Open  21
Stalled  1
View/Report Bugs
Source   Latest Release: Net-SSH-Perl-1.38

NAME ^

Net::SSH::Perl::Key::DSA - DSA key object

SYNOPSIS ^

    use Net::SSH::Perl::Key;
    my $key = Net::SSH::Perl::Key->new('DSA');

DESCRIPTION ^

Net::SSH::Perl::Key::DSA subclasses Net::SSH::Perl::Key to implement a key object, SSH style. This object provides all of the methods needed for a DSA key object; the underlying implementation is provided by Crypt::DSA, and this class wraps around that module to provide SSH-specific functionality (eg. taking in a Net::SSH::Perl::Buffer blob and transforming it into a key object).

USAGE ^

Net::SSH::Perl::Key::DSA implements the interface described in the documentation for Net::SSH::Perl::Key. Any differences or additions are described here.

$key->sign($data)

Wraps around Crypt::DSA::sign to sign $data using the private key portions of $key, then encodes that signature into an SSH-compatible signature blob.

Returns the signature blob.

$key->verify($signature, $data)

Given a signature blob $signature and the original signed data $data, attempts to verify the signature using the public key portion of $key. This wraps around Crypt::DSA::verify to perform the core verification.

$signature should be an SSH-compatible signature blob, as returned from sign; $data should be a string of data, as passed to sign.

Returns true if the verification succeeds, false otherwise.

AUTHOR & COPYRIGHTS ^

Please see the Net::SSH::Perl manpage for author, copyright, and license information.

syntax highlighting: