Cmsex.DigestedData (cmsex v0.1.0)

Copy Markdown View Source

A DigestedData message, as Cmsex.decode/2 reads it (RFC 5652, 7): a content and its digest, which shows it was not changed by accident, and nothing more: anyone can write a new digest. Cmsex.verify_digest/2 checks it.

Fields:

  • :version - the version written in the message.
  • :digest_algorithm - the name of the digest algorithm, such as :sha256, or its OID.
  • :content_type - the type of the content, as a name of Cmsex.OID or an OID.
  • :content - the content, or nil when it is not in the message. For a PKCS #7 message whose content is not an OCTET STRING, it is the content octets of that value, as in Cmsex.SignedData.
  • :pkcs7_content - for such a message, the whole encoding of the content; nil otherwise.
  • :digest - the digest.
  • :deviations - :digested_data_version when the version is not 0 for :data, or 2 for another type.

Summary

Types

t()

@type t() :: %Cmsex.DigestedData{
  content: binary() | nil,
  content_type: atom() | tuple(),
  deviations: [atom()],
  digest: binary(),
  digest_algorithm: atom() | tuple(),
  pkcs7_content: binary() | nil,
  raw: map() | nil,
  version: integer()
}