DKIM tag lists (RFC 6376 §3.2): tag=value pairs separated by ;,
as used by DKIM-Signature: fields, key records, and the ARC fields.
iex> Sovite.DKIM.Tags.parse("v=1; a=rsa-sha256;\r\n\td=example.com;")
{:ok, %{"v" => "1", "a" => "rsa-sha256", "d" => "example.com"}}Folding whitespace around tags and values is removed; inside values it
is kept (base64 values drop it with strip_whitespace/1). Tag names
are case-sensitive. A duplicate tag makes the whole list invalid.
Summary
Functions
Returns the raw field raw with the value of its b= tag emptied,
whitespace around it included, as signing and verifying need
(RFC 6376 §3.7). Everything else is kept byte for byte.
Parses a tag list into a map of tag names to values.
Removes all whitespace, for base64 values.
Removes folding whitespace from both ends of text.
Functions
Returns the raw field raw with the value of its b= tag emptied,
whitespace around it included, as signing and verifying need
(RFC 6376 §3.7). Everything else is kept byte for byte.
iex> Sovite.DKIM.Tags.empty_b("DKIM-Signature: a=x; b=abc\r\n def; bh=y\r\n")
"DKIM-Signature: a=x; b=; bh=y\r\n"
Parses a tag list into a map of tag names to values.
Removes all whitespace, for base64 values.
Removes folding whitespace from both ends of text.