#[non_exhaustive]pub enum WrapAlgorithm {
CmsRsaCbc,
CmsRsaGcm,
AesKeyWrap,
AesKeyWrapPad,
RsaOaepSha256,
}Expand description
Wrapping algorithm. Determines both the cryptographic method and the output format.
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.
CmsRsaCbc
CMS EnvelopedData with RSA PKCS#1 v1.5 + AES-256-CBC (legacy).
Output: CMS ContentInfo DER.
CmsRsaGcm
CMS AuthEnvelopedData with RSA PKCS#1 v1.5 + AES-256-GCM (recommended).
Output: CMS ContentInfo DER.
AesKeyWrap
NIST AES Key Wrap (RFC 3394). Requires a symmetric wrapping key. Output: raw wrapped key bytes (8-byte aligned).
AesKeyWrapPad
NIST AES Key Wrap with Padding (RFC 5649). Requires a symmetric wrapping key. Output: raw wrapped key bytes (arbitrary length input).
RsaOaepSha256
RSA-OAEP with SHA-256. Output: raw RSA-OAEP encrypted key bytes.
Trait Implementations§
Source§impl Clone for WrapAlgorithm
impl Clone for WrapAlgorithm
Source§fn clone(&self) -> WrapAlgorithm
fn clone(&self) -> WrapAlgorithm
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 moreimpl Copy for WrapAlgorithm
Source§impl Debug for WrapAlgorithm
impl Debug for WrapAlgorithm
Source§impl<'de> Deserialize<'de> for WrapAlgorithm
impl<'de> Deserialize<'de> for WrapAlgorithm
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 WrapAlgorithm
impl Display for WrapAlgorithm
impl Eq for WrapAlgorithm
Source§impl From<WrapAlgorithm> for String
impl From<WrapAlgorithm> for String
Source§fn from(a: WrapAlgorithm) -> String
fn from(a: WrapAlgorithm) -> String
Converts to this type from the input type.
Source§impl FromStr for WrapAlgorithm
impl FromStr for WrapAlgorithm
Source§impl PartialEq for WrapAlgorithm
impl PartialEq for WrapAlgorithm
Source§fn eq(&self, other: &WrapAlgorithm) -> bool
fn eq(&self, other: &WrapAlgorithm) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WrapAlgorithm
impl Serialize for WrapAlgorithm
impl StructuralPartialEq for WrapAlgorithm
Auto Trait Implementations§
impl Freeze for WrapAlgorithm
impl RefUnwindSafe for WrapAlgorithm
impl Send for WrapAlgorithm
impl Sync for WrapAlgorithm
impl Unpin for WrapAlgorithm
impl UnsafeUnpin for WrapAlgorithm
impl UnwindSafe for WrapAlgorithm
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