Click or drag to resize
MimeKit

CmsSigner(X509Certificate, AsymmetricKeyParameter, SubjectIdentifierType) Constructor

Initialize a new instance of the CmsSigner class.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public CmsSigner(
	X509Certificate certificate,
	AsymmetricKeyParameter key,
	SubjectIdentifierType signerIdentifierType = SubjectIdentifierType.IssuerAndSerialNumber
)

Parameters

certificate  X509Certificate
The signer's certificate.
key  AsymmetricKeyParameter
The signer's private key.
signerIdentifierType  SubjectIdentifierType  (Optional)
The scheme used for identifying the signer certificate.
Exceptions
ExceptionCondition
ArgumentNullException

certificate is null.

-or-

key is null.

ArgumentException

certificate cannot be used for signing.

-or-

key is not a private key.

Remarks

The initial value of the DigestAlgorithm will be set to Sha256 and both the SignedAttributes and UnsignedAttributes properties will be initialized to empty tables.

See Also