24 Aug 2017 05:51:41 UTC
- Distribution: Net-SSH-Perl
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (61)
- Testers (1710 / 0 / 0)
- KwaliteeBus factor: 2
- 47.96% Coverage
- License: perl_5
- Activity24 month
- Download (250.94KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:8 non-PAUSE usersSCHWIGON Steffen Schwigonand 2 contributors
- David Robins
- Lance Kinley
- AUTHOR & COPYRIGHTS
Net::SSH::Perl::Key::DSA - DSA key object
use Net::SSH::Perl::Key; my $key = Net::SSH::Perl::Key->new('DSA');
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::PK::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).
Net::SSH::Perl::Key::DSA implements the interface described in the documentation for Net::SSH::Perl::Key. Any differences or additions are described here.
Wraps around Crypt::PK::DSA::sign_message to sign $data using the key $key, then encodes that signature into an SSH-compatible signature blob. The output of Crypt::PK::DSA::sign_message is a DER ASN.1 binary structure, so that must be decoded to extract the components of the signature.
Returns the signature blob.
Given a signature blob $signature and the original signed data $data, attempts to verify the signature using the key $key. This wraps around Crypt::PK::DSA::verify_message to perform the core verification. Since Crypt::PK::DSA::verify_message requires a signature in DER ASN.1 format, the signature is reconfigured to that before being passed.
$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.
Please see the Net::SSH::Perl manpage for author, copyright, and license information.
Module Install Instructions
To install Net::SSH::Perl, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Net::SSH::Perl
For more information on module installation, please visit the detailed CPAN module installation guide.