logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Crypt::OpenSSL::DSA::Signature - Digital Signature Object

Author

       T.J. Mather, <tjmather@maxmind.com>

Class Methods

       $sig_obj = Crypt::OpenSSL::DSA::Signature->new();
           Create a new DSA Signature Object.  You will need to call set_r and set_s after you create this.

Name

         Crypt::OpenSSL::DSA::Signature - Digital Signature Object

Object Methods

       $r = $sig_obj->get_r;
           Gets first member of signature pair.

       $s = $sig_obj->get_s;
           Gets second member of signature pair.

       $r = $sig_obj->set_r;
           Sets first member of signature pair.

       $s = $sig_obj->set_s;
           Sets second member of signature pair.

See Also

       Crypt::OpenSSL::DSA

perl v5.40.0                                       2024-10-20                Crypt::OpenSSL::DSA::Signature(3pm)

Synopsis

         use Crypt::OpenSSL::DSA;
         my $dsa_priv = Crypt::OpenSSL::DSA->read_priv_key( $filename );
         my $sig_obj = $dsa_priv->do_sign($message);
         my $dsa_pub = Crypt::OpenSSL::DSA->read_pub_key( $filename );
         my $valid = $dsa_pub->do_verify($message, $sig_obj);
         my $sig_size = $dsa_priv->get_sig_size();

         my $r = $sig_obj->get_r;
         my $s = $sig_obj->get_s;

         my $sig_obj2 = Crypt::OpenSSL::DSA::Signature->new();
         $sig_obj2->set_r($r);
         $sig_obj2->set_s($s);
         my $valid = $dsa_pub->do_verify($message, $sig_obj2);

See Also