package dkim

  1. Overview
  2. Docs
On This Page
  1. Encoding

Module Dkim.EncoderSource

Encoding

The Encoder module provides Prettym formatters for the individual components of a DKIM-Signature header field. The main entry point is Encoder.as_field, which emits a complete DKIM-Signature: ... header line with proper folding for long values.

Sourceval algorithm : (algorithm * hash_algorithm) Prettym.t

Formats the algorithm and hash (e.g. "rsa-sha256").

Sourceval domain : [ `raw ] Domain_name.t Prettym.t

Formats a domain name for the d= tag.

Sourceval selector : [ `raw ] Domain_name.t Prettym.t

Formats a selector for the s= tag.

Sourceval timestamp : int64 Prettym.t

Formats a Unix timestamp for the t= tag.

Sourceval expiration : int64 Prettym.t

Formats an expiration time for the x= tag.

Sourceval length : int Prettym.t

Formats a body length for the l= tag.

Sourceval signature : string Prettym.t

Formats a base64-encoded signature for the b= tag.

Sourceval dkim_signature : ?with_version:bool -> (string * hash_value) t Prettym.t

Formats the tag-value list of a signed DKIM record (everything after the colon in a DKIM-Signature field).

Sourceval as_field : ?with_version:bool -> (string * hash_value) t Prettym.t

Formats a complete DKIM-Signature header field, including the field name, colon, properly folded tag-value list, and trailing newline.