Header canonicalization (RFC 6376 §3.4.1 and §3.4.2), and the header data a signature covers (§3.7, §5.4.2).
Body canonicalization works on a stream, see Sovite.DKIM.Body.
Summary
Functions
Canonicalizes one header field, given as its raw text with the final CRLF.
Selects the fields named in names (a signature's h= tag), as
§5.4.2 says: each occurrence of a name takes the next instance from the
bottom of the header; a name with no instance left adds nothing.
The data that is hashed and signed: the selected fields, canonicalized,
then the signature field itself with its b= value emptied and no final
CRLF.
Types
Functions
Canonicalizes one header field, given as its raw text with the final CRLF.
iex> Sovite.DKIM.Canon.header("SubJect : Hello \r\n world \r\n", :relaxed)
"subject:Hello world\r\n"
Selects the fields named in names (a signature's h= tag), as
§5.4.2 says: each occurrence of a name takes the next instance from the
bottom of the header; a name with no instance left adds nothing.
fields are as Sovite.Message.Headers.parse/1 returns them.
The data that is hashed and signed: the selected fields, canonicalized,
then the signature field itself with its b= value emptied and no final
CRLF.