# Digital signature reference

Signer

The `Signer` class is a base class that is used to build a message signature. The signature result is stored in a special signature object which is algorithm dependent.

signer-p
Nameable
reset
none
none

The `reset` method reset the signer object with its associated internal states.

compute
Signature
Literal|Buffer|InputStream

The `compute` method computes the signature from a string, a buffer or an input stream. The method returns a signature object. When the argument is a buffer object or an input stream, the characters are consumed from the object.

derive
Signature
String

The `derive` method computes the signature from an octet string which is converted before the signature computation. The method returns a signature object.

Signature

The `Signature` class is a container class designed to store a message signature. The signature object is produced by a signing process, implemented in the form of a digital signature algorithm such like RSA or DSA.

signature-p
Object
Signature
none

The `Signature` constructor creates an empty signature.

NIL

The `NIL` constant indicates that the signature is a null signature.

DSA

The `DSA` constant indicates that the signature is conforming to DSS.

DSA-S-COMPONENT

The `DSA-S-COMPONENT` constant corresponds to the DSA S component value.

DSA-R-COMPONENT

The `DSA-R-COMPONENT` constant corresponds to the DSA R component value.

reset
none
none

The `reset` method reset the signature object to a null signature.

format
String
Item

The `format` method returns a string representation of the signature component. The signature component is returned as an octet string based on the signature component to access.

get-relatif-component
Relatif
Item

The `get-relatif-component` method returns a relatif representation of a signature component.

Dsa

The `Dsa` class is an original implementation of the Digital Signature Standard (DSS) as published in FIPS PUB 186-3. This class implements the Digital Signature Algorithm (DSA) with an approved key length of 1024, 2048 and 3072 bits with a 160, 224 and 256 bits hash function which is part of the SHA family.

dsa-p
Signer
Dsa
none

The `Dsa` constructor creates a signer object with a default DSA key.

Dsa
Key

The `Dsa` constructor creates a signer object with a DSA key as its argument.

Dsa
Key Relatif

The `Dsa` constructor creates a signer object with a DSA key as its first argument and a fixed k argument as specified by DSS.