Click or drag to resize

MessageSigner Constructor (X509Certificate2, Oid2)

Initializes a new instance of the MessageSigner class from signer certificate and client-provided hash algorithm.

Namespace:  SysadminsLV.PKI.Tools.MessageOperations
Assembly:  PKI.Core (in PKI.Core.dll) Version: 3.3.0.0 (3.3.0.0)
Syntax
public MessageSigner(
	X509Certificate2 signer,
	Oid2 hashAlgorithm
)

Parameters

signer
Type: System.Security.Cryptography.X509CertificatesX509Certificate2
Signer certificate with associated private key.
hashAlgorithm
Type: System.Security.CryptographyOid2
Hash algorithm that is used to calculate the hash during signing or signature verification processes.
Exceptions
ExceptionCondition
ArgumentExceptionhashAlgorithm parameter contains invalid hash algorithm identifier.
UninitializedObjectExceptionSigner certificate is not initialized.
ArgumentNullExceptionsigner and/or hashAlgorithm parameter is null.
Remarks
Currently the following hash algorithms are supported:
  • MD5
  • SHA1
  • SHA256
  • SHA384
  • SHA512
Hash algorithm is ignored for DSA keys and is automatically set to 'SHA1'.
See Also