| DkimSignatureAlgorithm Enumeration |
A DKIM signature algorithm.
Namespace: MimeKit.CryptographyAssembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax public enum DkimSignatureAlgorithm
Members Member name | Value | Description |
---|
RsaSha1 | 0 |
The RSA-SHA1 signature algorithm.
|
RsaSha256 | 1 |
The RSA-SHA256 signature algorithm.
|
Ed25519Sha256 | 2 |
The Ed25519-SHA256 signature algorithm.
|
Remarks
A DKIM signature algorithm.
Example public static void DkimSign (MimeMessage message)
{
var headers = new HeaderId[] { HeaderId.From, HeaderId.Subject, HeaderId.Date };
var signer = new DkimSigner ("privatekey.pem", "example.com", "brisbane", DkimSignatureAlgorithm.RsaSha256) {
HeaderCanonicalizationAlgorithm = DkimCanonicalizationAlgorithm.Simple,
BodyCanonicalizationAlgorithm = DkimCanonicalizationAlgorithm.Simple,
AgentOrUserIdentifier = "@eng.example.com",
QueryMethod = "dns/txt",
};
message.Prepare (EncodingConstraint.SevenBit);
signer.Sign (message, headers);
}
See Also