Struct cms::builder::KeyAgreeRecipientInfoBuilder
source · pub struct KeyAgreeRecipientInfoBuilder {
pub originator: OriginatorIdentifierOrKey,
pub ukm: Option<UserKeyingMaterial>,
pub key_enc_alg: AlgorithmIdentifierOwned,
}
Available on crate feature
builder
only.Expand description
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.
Fields§
§originator: OriginatorIdentifierOrKey
A CHOICE with three alternatives specifying the sender’s key agreement public key.
ukm: Option<UserKeyingMaterial>
Optional information which helps generating different keys every time.
key_enc_alg: AlgorithmIdentifierOwned
Encryption algorithm to be used for key encryption
Implementations§
source§impl KeyAgreeRecipientInfoBuilder
impl KeyAgreeRecipientInfoBuilder
sourcepub fn new(
originator: OriginatorIdentifierOrKey,
ukm: Option<UserKeyingMaterial>,
key_enc_alg: AlgorithmIdentifierOwned
) -> Result<KeyAgreeRecipientInfoBuilder, Error>
pub fn new( originator: OriginatorIdentifierOrKey, ukm: Option<UserKeyingMaterial>, key_enc_alg: AlgorithmIdentifierOwned ) -> Result<KeyAgreeRecipientInfoBuilder, Error>
Creates a KeyAgreeRecipientInfoBuilder
Trait Implementations§
source§impl RecipientInfoBuilder for KeyAgreeRecipientInfoBuilder
impl RecipientInfoBuilder for KeyAgreeRecipientInfoBuilder
source§fn recipient_info_type(&self) -> RecipientInfoType
fn recipient_info_type(&self) -> RecipientInfoType
Returns the RecipientInfoType
source§fn recipient_info_version(&self) -> CmsVersion
fn recipient_info_version(&self) -> CmsVersion
Returns the CMSVersion
for this RecipientInfo
Auto Trait Implementations§
impl RefUnwindSafe for KeyAgreeRecipientInfoBuilder
impl Send for KeyAgreeRecipientInfoBuilder
impl Sync for KeyAgreeRecipientInfoBuilder
impl Unpin for KeyAgreeRecipientInfoBuilder
impl UnwindSafe for KeyAgreeRecipientInfoBuilder
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