pub trait RecipientInfoBuilder {
    // Required methods
    fn recipient_info_type(&self) -> RecipientInfoType;
    fn recipient_info_version(&self) -> CmsVersion;
    fn build(
        &mut self,
        content_encryption_key: &[u8]
    ) -> Result<RecipientInfo, Error>;
}
Available on crate feature builder only.
Expand description

Trait for builders of a RecipientInfo. RFC 5652 § 6 defines 5 different RecipientInfo formats. All implementations must implement this trait.

Required Methods§

source

fn recipient_info_type(&self) -> RecipientInfoType

Return the recipient info type

source

fn recipient_info_version(&self) -> CmsVersion

Return the recipient info version

source

fn build( &mut self, content_encryption_key: &[u8] ) -> Result<RecipientInfo, Error>

Encrypt the content_encryption_key using a method, that is specific for the implementing builder type. Finally return a RecipientInfo.

Implementors§