DkimSignerBase(AsymmetricKeyParameter, String, String, DkimSignatureAlgorithm) Constructor

Initialize a new instance of the DkimSignerBase class.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
protected DkimSignerBase(
	AsymmetricKeyParameter key,
	string domain,
	string selector,
	DkimSignatureAlgorithm algorithm = DkimSignatureAlgorithm.RsaSha256
)

Parameters

key  AsymmetricKeyParameter
The private key used for signing.
domain  String
The domain that the signer represents.
selector  String
The selector subdividing the domain.
algorithm  DkimSignatureAlgorithm  (Optional)
The signature algorithm.

Remarks

Creates a new DkimSignerBase.

  Security Note

Due to the recognized weakness of the SHA-1 hash algorithm and the wide availability of the SHA-256 hash algorithm (it has been a required part of DKIM since it was originally standardized in 2007), it is recommended that RsaSha1 NOT be used.

Exceptions

ArgumentNullException

key is .

-or-

domain is .

-or-

selector is .

ArgumentException key is not a private key.

See Also