Available on crate feature
builder
only.Expand description
CMS Builder
Structs
- Builds CMS
EnvelopedData
according to RFC 5652 § 6. - Builds a
KekRecipientInfo
according to RFC 5652 § 6. Uses symmetric key-encryption keys: the content-encryption key is encrypted in a previously distributed symmetric key-encryption key. - Builds a
KeyAgreeRecipientInfo
according to RFC 5652 § 6. This type uses key agreement: the recipient’s public key and the sender’s private key are used to generate a pairwise symmetric key, then the content-encryption key is encrypted in the pairwise symmetric key. - Builds a
KeyTransRecipientInfo
according to RFC 5652 § 6. This type uses the recipient’s public key to encrypt the content-encryption key. - Builds an
OtherRecipientInfo
according to RFC 5652 § 6. This type makes no assumption about the encryption method or the needed information. - Builds a
PasswordRecipientInfo
according to RFC 5652 § 6. Uses a password or shared secret value to encrypt the content-encryption key. - Builder for signedData (CMS and PKCS #7)
- Collect info needed for creating a
SignerInfo
. Callingbuild()
on this struct will
Enums
- Supported content encryption algorithms.
- Error type
- Contains information required to encrypt the content encryption key with a specific method
RecipientInfoBuilder
must be implemented for these 5 recipient info types as defined in RFC 5652 § 6:
Traits
- Trait for builders of a
RecipientInfo
. RFC 5652 § 6 defines 5 differentRecipientInfo
formats. All implementations must implement this trait.
Functions
- Create a content-type attribute according to RFC 5652 § 11.1
- Create a message digest attribute according to RFC 5652 § 11.2
- Create a signing time attribute according to RFC 5652 § 11.3 Dates between 1 January 1950 and 31 December 2049 (inclusive) MUST be encoded as UTCTime. Any dates with year values before 1950 or after 2049 MUST be encoded as GeneralizedTime.