• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class DkimSigner

Signs messages with DKIM (RFC 6376 §5). The signer adds a DKIM-Signature header to a message by computing the body hash, canonicalizing the signed headers, and signing the result with an RSA private key.

Inheritance
object
DkimSigner
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Mail.Rfc.Dkim
Assembly: DRIT.Mail.dll
Syntax
public sealed class DkimSigner

Constructors

View Source

DkimSigner(DkimSignerOptions)

Initializes a new instance of the DkimSigner class with the specified options.

Declaration
public DkimSigner(DkimSignerOptions options)
Parameters
Type Name Description
DkimSignerOptions options

The options controlling the operation.

Methods

View Source

Sign(MimeMessage)

Signs a MimeMessage by serializing it first, then signing the serialized bytes. The result is a new MimeMessage with the DKIM-Signature header prepended.

Declaration
public MimeMessage Sign(MimeMessage message)
Parameters
Type Name Description
MimeMessage message

The message to process.

Returns
Type Description
MimeMessage
View Source

Sign(byte[])

Signs the given raw message bytes and returns the signed message bytes. This is the preferred overload because DKIM operates on the exact byte representation of the message.

Declaration
public byte[] Sign(byte[] messageBytes)
Parameters
Type Name Description
byte[] messageBytes

The message bytes used by the operation.

Returns
Type Description
byte[]
View Source

Sign(Stream, Stream)

Signs the message read from input and writes the signed message to output.

Declaration
public void Sign(Stream input, Stream output)
Parameters
Type Name Description
Stream input

Specifies the input value.

Stream output

Specifies the output value.

  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX