An EnvelopedData (RFC 5652, 6) or AuthEnvelopedData (RFC 5083) message,
as Cmsex.decode/2 reads it. Reading checks the structure only;
Cmsex.decrypt/2 decrypts.
Fields:
:type-:enveloped_data, or:auth_enveloped_datafor content encrypted with an authenticated cipher, such as AES-GCM.:version- the version written in the message.:recipient_infos- the recipients, a list ofCmsex.RecipientInfo.:content_type- the type of the encrypted content, as a name ofCmsex.OID, such as:data, or an OID.:content_encryption_algorithm- the name of the cipher inCmsex.OID, such as:aes256_cbcor:aes256_gcm, or its OID.:encrypted_content- the ciphertext, its segments joined when the message was written in BER, ornilwhen it is not in the message.:certificates,:other_certificates,:crls,:other_crls- the OriginatorInfo, as inCmsex.SignedData; empty when it is absent.:authenticated_attributes- for:auth_enveloped_data, the attributes the tag covers, a list ofCmsex.Attribute, ornil.:mac- for:auth_enveloped_data, the tag;nilotherwise.:unprotected_attributes- the unprotectedAttrs of an EnvelopedData, or the unauthAttrs of an AuthEnvelopedData: attributes that nothing protects, empty when there are none.:deviations- what the library tolerated when reading, against RFC 5652 and RFC 5083::enveloped_data_versionwhen the version is not the one the fields call for. The recipients have their own.
Summary
Types
@type t() :: %Cmsex.EnvelopedData{ authenticated_attributes: [Cmsex.Attribute.t()] | nil, certificates: [binary()], content_encryption_algorithm: atom() | tuple(), content_type: atom() | tuple(), crls: [binary()], deviations: [atom()], encrypted_content: binary() | nil, mac: binary() | nil, other_certificates: [binary()], other_crls: [binary()], raw: map() | nil, recipient_infos: [Cmsex.RecipientInfo.t()], type: :enveloped_data | :auth_enveloped_data, unprotected_attributes: [Cmsex.Attribute.t()], version: integer() }