# phpman > perldoc > Crypt::DSA::Signature

## NAME
    [Crypt::DSA::Signature](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ADSA%3A%3ASignature/markdown) - DSA signature object

## SYNOPSIS
        use [Crypt::DSA::Signature](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ADSA%3A%3ASignature/markdown);
        my $sig = [Crypt::DSA::Signature](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ADSA%3A%3ASignature/markdown)->new;

        $sig->r($r);
        $sig->s($s);

## DESCRIPTION
    *[Crypt::DSA::Signature](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ADSA%3A%3ASignature/markdown)* represents a DSA signature. It has 2 methods, *r* and *s*, which are the
    big number representations of the 2 pieces of the DSA signature.

## USAGE
  [Crypt::DSA::Signature](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ADSA%3A%3ASignature/markdown)->new( %options )
    Creates a new signature object, and optionally initializes it with the information in
    *%options*, which can contain:

    *   Content

        An ASN.1-encoded string representing the DSA signature. In ASN.1 notation, this looks like:

            SEQUENCE {
                r INTEGER,
                s INTEGER
            }

        If *Content* is provided, *new* will automatically call the *deserialize* method to parse
        the content, and set the *r* and *s* methods on the resulting *[Crypt::DSA::Signature](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ADSA%3A%3ASignature/markdown)*
        object.

  $sig->serialize
    Serializes the signature object *$sig* into the format described above: an ASN.1-encoded
    representation of the signature, using the ASN.1 syntax above.

AUTHOR & COPYRIGHTS
    Please see the [Crypt::DSA](https://www.chedong.com/phpMan.php/perldoc/Crypt%3A%3ADSA/markdown) manpage for author, copyright, and license information.

