pub struct KeyTransRecipientInfoBuilder<'a, R>where
R: CryptoRngCore,{
pub rid: RecipientIdentifier,
pub key_encryption_info: KeyEncryptionInfo,
/* private fields */
}
Available on crate feature
builder
only.Expand description
Builds a KeyTransRecipientInfo
according to RFC 5652 § 6.
This type uses the recipient’s public key to encrypt the content-encryption key.
Fields§
§rid: RecipientIdentifier
Identifies the recipient
key_encryption_info: KeyEncryptionInfo
Info for key encryption
Implementations§
Source§impl<'a, R> KeyTransRecipientInfoBuilder<'a, R>where
R: CryptoRngCore,
impl<'a, R> KeyTransRecipientInfoBuilder<'a, R>where
R: CryptoRngCore,
Sourcepub fn new(
rid: RecipientIdentifier,
key_encryption_info: KeyEncryptionInfo,
rng: &'a mut R,
) -> Result<KeyTransRecipientInfoBuilder<'a, R>, Error>
pub fn new( rid: RecipientIdentifier, key_encryption_info: KeyEncryptionInfo, rng: &'a mut R, ) -> Result<KeyTransRecipientInfoBuilder<'a, R>, Error>
Creates a KeyTransRecipientInfoBuilder
Trait Implementations§
Source§impl<'a, R> RecipientInfoBuilder for KeyTransRecipientInfoBuilder<'a, R>where
R: CryptoRngCore,
impl<'a, R> RecipientInfoBuilder for KeyTransRecipientInfoBuilder<'a, R>where
R: CryptoRngCore,
Source§fn build(
&mut self,
content_encryption_key: &[u8],
) -> Result<RecipientInfo, Error>
fn build( &mut self, content_encryption_key: &[u8], ) -> Result<RecipientInfo, Error>
Build a KeyTransRecipientInfo
. See RFC 5652 § 6.2.1
content_encryption_key
will be encrypted with the recipient’s public key.
Source§fn recipient_info_type(&self) -> RecipientInfoType
fn recipient_info_type(&self) -> RecipientInfoType
Return the recipient info type
Source§fn recipient_info_version(&self) -> CmsVersion
fn recipient_info_version(&self) -> CmsVersion
Return the recipient info version
Auto Trait Implementations§
impl<'a, R> Freeze for KeyTransRecipientInfoBuilder<'a, R>
impl<'a, R> RefUnwindSafe for KeyTransRecipientInfoBuilder<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for KeyTransRecipientInfoBuilder<'a, R>where
R: Send,
impl<'a, R> Sync for KeyTransRecipientInfoBuilder<'a, R>where
R: Sync,
impl<'a, R> Unpin for KeyTransRecipientInfoBuilder<'a, R>
impl<'a, R> !UnwindSafe for KeyTransRecipientInfoBuilder<'a, R>
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