Available on crate feature
builder only.Expand description
CMS Builder
Structs§
- Enveloped
Data Builder - Builds CMS
EnvelopedDataaccording to RFC 5652 § 6. - KekRecipient
Info Builder - Builds a
KekRecipientInfoaccording to RFC 5652 § 6. Uses symmetric key-encryption keys: the content-encryption key is encrypted in a previously distributed symmetric key-encryption key. - KeyAgree
Recipient Info Builder - Builds a
KeyAgreeRecipientInfoaccording 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. - KeyTrans
Recipient Info Builder - Builds a
KeyTransRecipientInfoaccording to RFC 5652 § 6. This type uses the recipient’s public key to encrypt the content-encryption key. - Other
Recipient Info Builder - Builds an
OtherRecipientInfoaccording to RFC 5652 § 6. This type makes no assumption about the encryption method or the needed information. - Password
Recipient Info Builder - Builds a
PasswordRecipientInfoaccording to RFC 5652 § 6. Uses a password or shared secret value to encrypt the content-encryption key. - Signed
Data Builder - Builder for signedData (CMS and PKCS #7)
- Signer
Info Builder - Collect info needed for creating a
SignerInfo. Callingbuild()on this struct will
Enums§
- Content
Encryption Algorithm - Supported content encryption algorithms.
- Error
- Error type
- KeyEncryption
Info - Contains information required to encrypt the content encryption key with a specific method
- Recipient
Info Type RecipientInfoBuildermust be implemented for these 5 recipient info types as defined in RFC 5652 § 6:
Traits§
- Recipient
Info Builder - Trait for builders of a
RecipientInfo. RFC 5652 § 6 defines 5 differentRecipientInfoformats. All implementations must implement this trait.
Functions§
- create_
content_ type_ attribute - Create a content-type attribute according to RFC 5652 § 11.1
- create_
message_ digest_ attribute - Create a message digest attribute according to RFC 5652 § 11.2
- create_
signing_ time_ attribute - 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.