Univrse.Header (Univrse v0.2.0) View Source

Header module.

A Universe Header is simply an map of arbitrary key-value pairs. Headers can be found in the Univrse.Envelope.t/0, Univrse.Signature.t/0 and Univrse.Recipient.t/0 structs.

Known header parameters include:

  • alg - Signature or encryption algorithm (Signature, Recipient)
  • crit - An array of critical headers (Envelope)
  • cty - Content type (Envelope)
  • iv - Initialisation vector (Recipient)
  • kid - Key identifier (Signature, Recipient)
  • proto - Protocol identifier (Envelope)
  • zip - Compression algorithm (Envelope)

Link to this section Summary

Types

t()

Header struct.

Functions

Unwraps the Header struct and returns the map of headers.

Wraps the given map of headers in a Header struct.

Link to this section Types

Specs

t() :: %Univrse.Header{headers: map()}

Header struct.

A simple wrapper around a map of key-value pairs.

Link to this section Functions

Specs

unwrap(t()) :: map()

Unwraps the Header struct and returns the map of headers.

Specs

wrap(map()) :: t()

Wraps the given map of headers in a Header struct.