pub enum EncryptionRecipient {
RsaOaep {
public_key: Arc<dyn KeyTransportKey>,
parameters: RsaOaepParameters,
recipient: Option<String>,
key_name: Option<String>,
},
AesKeyWrap {
kek: Vec<u8>,
algorithm: KeyWrapAlgorithm,
recipient: Option<String>,
key_name: Option<String>,
},
}Expand description
One recipient of a generated content-encryption key.
Variants§
RsaOaep
Wrap the content key with an RSA public key and OAEP.
Fields
§
public_key: Arc<dyn KeyTransportKey>Opaque recipient public-key handle.
§
parameters: RsaOaepParametersOAEP algorithm parameters.
AesKeyWrap
Wrap the content key with a pre-shared AES KEK.
Implementations§
Source§impl EncryptionRecipient
impl EncryptionRecipient
Sourcepub fn rsa_oaep(public_key: RsaPublicKey) -> Self
pub fn rsa_oaep(public_key: RsaPublicKey) -> Self
Create an RSA-OAEP recipient using SHA-256 and MGF1-SHA-256.
XMLEnc 1.1 assigns SHA-1 and MGF1-SHA-1 when these parameters are omitted. Serialized keys therefore include both algorithm values explicitly instead of relying on the specification’s legacy defaults.
Sourcepub fn provider_key_transport(public_key: Arc<dyn KeyTransportKey>) -> Self
pub fn provider_key_transport(public_key: Arc<dyn KeyTransportKey>) -> Self
Create an RSA-OAEP recipient from an opaque provider key handle.
Sourcepub fn aes_key_wrap(
kek: impl Into<Vec<u8>>,
algorithm: KeyWrapAlgorithm,
) -> Self
pub fn aes_key_wrap( kek: impl Into<Vec<u8>>, algorithm: KeyWrapAlgorithm, ) -> Self
Create an AES Key Wrap recipient.
Sourcepub fn oaep_parameters(self, parameters: RsaOaepParameters) -> Self
pub fn oaep_parameters(self, parameters: RsaOaepParameters) -> Self
Override RSA-OAEP parameters.
Trait Implementations§
Source§impl Clone for EncryptionRecipient
impl Clone for EncryptionRecipient
Source§fn clone(&self) -> EncryptionRecipient
fn clone(&self) -> EncryptionRecipient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for EncryptionRecipient
impl !UnwindSafe for EncryptionRecipient
impl Freeze for EncryptionRecipient
impl Send for EncryptionRecipient
impl Sync for EncryptionRecipient
impl Unpin for EncryptionRecipient
impl UnsafeUnpin for EncryptionRecipient
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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