Mono Class Library: System.Security.Cryptography.DSASignatureFormatter Overview | Members

System.Security.Cryptography.DSASignatureFormatter.CreateSignature Method

Compute the signature for the specified hash value using the DSA private key. [Edit]

public override byte[] CreateSignature (byte[] rgbHash)

Parameters

rgbHash
The hash to be signed. [Edit]

Returns

The signature is returned in a 40 bytes array. [Edit]

Remarks

A System.Security.Cryptography.CryptographicUnexpectedOperationException will be thrown if a System.Security.Cryptography.DSA object instance hasn't been set in the constructor or by DSASignatureFormatter.SetKey.

The hash byte array should always have 20 bytes as only the SHA-1 algorithm is supported.

The size of the signature, 40 bytes, isn't affected by the length of the public key (512 - 1024 bits).

[Edit]

Requirements

Namespace: System.Security.Cryptography
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0