#[non_exhaustive]pub enum KeyEncryptionAlgorithm {
RsaPkcs1v15,
RsaOaep,
EcdhEs {
curve: EcCurve,
},
}Expand description
Algorithm used to encrypt (wrap) the content-encryption key.
§ECDH / KARI
ECDH key agreement (KeyAgreeRecipientInfo, RFC 5753) uses a separate
trait method: DecryptionKey::agree_ecdh. ECDH key agreement for
decryption uses DecryptionKey::agree_ecdh() directly, not decrypt_cek().
The EcdhEs variant exists for completeness but decrypt_cek() implementations
do not need to handle it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RsaPkcs1v15
RSA PKCS#1 v1.5 key transport (RFC 8017).
RsaOaep
RSA-OAEP key transport (RFC 8017).
EcdhEs
Reserved for future ECDH-ES key agreement support. Never produced by
the current implementation of decrypt(); present for forward
compatibility only.
ECDH key agreement is handled via DecryptionKey::agree_ecdh instead.
decrypt_cek() implementations do not need to handle this variant.
Trait Implementations§
Source§impl Clone for KeyEncryptionAlgorithm
impl Clone for KeyEncryptionAlgorithm
Source§fn clone(&self) -> KeyEncryptionAlgorithm
fn clone(&self) -> KeyEncryptionAlgorithm
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 moreSource§impl Debug for KeyEncryptionAlgorithm
impl Debug for KeyEncryptionAlgorithm
Source§impl<'de> Deserialize<'de> for KeyEncryptionAlgorithm
impl<'de> Deserialize<'de> for KeyEncryptionAlgorithm
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for KeyEncryptionAlgorithm
impl Display for KeyEncryptionAlgorithm
impl Eq for KeyEncryptionAlgorithm
Source§impl PartialEq for KeyEncryptionAlgorithm
impl PartialEq for KeyEncryptionAlgorithm
Source§fn eq(&self, other: &KeyEncryptionAlgorithm) -> bool
fn eq(&self, other: &KeyEncryptionAlgorithm) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for KeyEncryptionAlgorithm
impl Serialize for KeyEncryptionAlgorithm
impl StructuralPartialEq for KeyEncryptionAlgorithm
Auto Trait Implementations§
impl Freeze for KeyEncryptionAlgorithm
impl RefUnwindSafe for KeyEncryptionAlgorithm
impl Send for KeyEncryptionAlgorithm
impl Sync for KeyEncryptionAlgorithm
impl Unpin for KeyEncryptionAlgorithm
impl UnsafeUnpin for KeyEncryptionAlgorithm
impl UnwindSafe for KeyEncryptionAlgorithm
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