Struct cms::builder::EnvelopedDataBuilder
source · pub struct EnvelopedDataBuilder<'c> { /* private fields */ }
Available on crate feature
builder
only.Expand description
Builds CMS EnvelopedData
according to RFC 5652 § 6.
Implementations§
source§impl<'c> EnvelopedDataBuilder<'c>
impl<'c> EnvelopedDataBuilder<'c>
sourcepub fn new(
originator_info: Option<OriginatorInfo>,
unencrypted_content: &'c [u8],
content_encryption_algorithm: ContentEncryptionAlgorithm,
unprotected_attributes: Option<Attributes>
) -> Result<EnvelopedDataBuilder<'c>, Error>
pub fn new( originator_info: Option<OriginatorInfo>, unencrypted_content: &'c [u8], content_encryption_algorithm: ContentEncryptionAlgorithm, unprotected_attributes: Option<Attributes> ) -> Result<EnvelopedDataBuilder<'c>, Error>
Create a new builder for EnvelopedData
sourcepub fn add_recipient_info(
&mut self,
recipient_info_builder: impl RecipientInfoBuilder + 'c
) -> Result<&mut Self, Error>
pub fn add_recipient_info( &mut self, recipient_info_builder: impl RecipientInfoBuilder + 'c ) -> Result<&mut Self, Error>
Add recipient info. A builder is used, which generates a RecipientInfo
according to
RFC 5652 § 6.2, when EnvelopedData
is built.
sourcepub fn build_with_rng(
&mut self,
rng: &mut impl CryptoRngCore
) -> Result<EnvelopedData, Error>
pub fn build_with_rng( &mut self, rng: &mut impl CryptoRngCore ) -> Result<EnvelopedData, Error>
Generate an EnvelopedData
object according to RFC 5652 § 6 using a provided
random number generator.
Auto Trait Implementations§
impl<'c> !RefUnwindSafe for EnvelopedDataBuilder<'c>
impl<'c> !Send for EnvelopedDataBuilder<'c>
impl<'c> !Sync for EnvelopedDataBuilder<'c>
impl<'c> Unpin for EnvelopedDataBuilder<'c>
impl<'c> !UnwindSafe for EnvelopedDataBuilder<'c>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more