Cmsex.EncryptedData (cmsex v0.1.0)

Copy Markdown View Source

An EncryptedData message, as Cmsex.decode/2 reads it (RFC 5652, 8): content encrypted with a key the parties manage by other means, with no recipients. Cmsex.decrypt/2 with :content_key decrypts it.

Fields:

  • :version - the version written in the message.
  • :content_type - the type of the encrypted content, as a name of Cmsex.OID or an OID.
  • :content_encryption_algorithm - the name of the cipher in Cmsex.OID, such as :aes256_cbc, or its OID.
  • :encrypted_content - the ciphertext, or nil when it is not in the message.
  • :unprotected_attributes - attributes that nothing protects, empty when there are none.
  • :deviations - :encrypted_data_version when the version is not 0 without unprotected attributes, or 2 with them.

Summary

Types

t()

@type t() :: %Cmsex.EncryptedData{
  content_encryption_algorithm: atom() | tuple(),
  content_type: atom() | tuple(),
  deviations: [atom()],
  encrypted_content: binary() | nil,
  raw: map() | nil,
  unprotected_attributes: [Cmsex.Attribute.t()],
  version: integer()
}