pub enum KeyMechanism {
Show 19 variants
AesDecryptionCbc,
AesEncryptionCbc,
EcdsaSignature,
EdDsaSignature,
RsaDecryptionOaepMd5,
RsaDecryptionOaepSha1,
RsaDecryptionOaepSha224,
RsaDecryptionOaepSha256,
RsaDecryptionOaepSha384,
RsaDecryptionOaepSha512,
RsaDecryptionPkcs1,
RsaDecryptionRaw,
RsaSignaturePkcs1,
RsaSignaturePssMd5,
RsaSignaturePssSha1,
RsaSignaturePssSha224,
RsaSignaturePssSha256,
RsaSignaturePssSha384,
RsaSignaturePssSha512,
}
Expand description
A mechanism which can be used with a key
Variants§
AesDecryptionCbc
Decryption using the Advanced Encryption Standard (AES) with Cipher Block Chaining (CBC)
AesEncryptionCbc
Encryption using the Advanced Encryption Standard (AES) with Cipher Block Chaining (CBC)
EcdsaSignature
Signing following the Elliptic Curve Digital Signature Algorithm (ECDSA)
EdDsaSignature
Signing following the Edwards-curve Digital Signature Algorithm (EdDSA)
RsaDecryptionOaepMd5
RSA decryption with Optimal Asymmetric Encryption Padding (OAEP) using an MD-5 hash
RsaDecryptionOaepSha1
RSA decryption with Optimal Asymmetric Encryption Padding (OAEP) using a SHA-1 hash
RsaDecryptionOaepSha224
RSA decryption with Optimal Asymmetric Encryption Padding (OAEP) using a SHA-224 hash
RsaDecryptionOaepSha256
RSA decryption with Optimal Asymmetric Encryption Padding (OAEP) using a SHA-256 hash
RsaDecryptionOaepSha384
RSA decryption with Optimal Asymmetric Encryption Padding (OAEP) using a SHA-384 hash
RsaDecryptionOaepSha512
RSA decryption with Optimal Asymmetric Encryption Padding (OAEP) using a SHA-512 hash
RsaDecryptionPkcs1
RSA decryption following the PKCS#1 standard
RsaDecryptionRaw
Raw RSA decryption
RsaSignaturePkcs1
RSA signing following the PKCS#1 standard
RsaSignaturePssMd5
RSA signing following a “probabilistic signature scheme” (PSS) using an MD-5 hash
RsaSignaturePssSha1
RSA signing following a “probabilistic signature scheme” (PSS) using a SHA-1 hash
RsaSignaturePssSha224
RSA signing following a “probabilistic signature scheme” (PSS) using a SHA-224 hash
RsaSignaturePssSha256
RSA signing following a “probabilistic signature scheme” (PSS) using a SHA-256 hash
RsaSignaturePssSha384
RSA signing following a “probabilistic signature scheme” (PSS) using a SHA-384 hash
RsaSignaturePssSha512
RSA signing following a “probabilistic signature scheme” (PSS) using a SHA-512 hash
Implementations§
source§impl KeyMechanism
impl KeyMechanism
sourcepub fn curve25519_mechanisms() -> Vec<KeyMechanism>
pub fn curve25519_mechanisms() -> Vec<KeyMechanism>
Returns key mechanisms specific to Curve25519 key types
sourcepub fn elliptic_curve_mechanisms() -> Vec<KeyMechanism>
pub fn elliptic_curve_mechanisms() -> Vec<KeyMechanism>
Returns key mechanisms specific to elliptic curve key types
sourcepub fn generic_mechanisms() -> Vec<KeyMechanism>
pub fn generic_mechanisms() -> Vec<KeyMechanism>
Returns key mechanisms specific to generic key types
sourcepub fn rsa_mechanisms() -> Vec<KeyMechanism>
pub fn rsa_mechanisms() -> Vec<KeyMechanism>
Returns key mechanisms specific to RSA key types
Trait Implementations§
source§impl Clone for KeyMechanism
impl Clone for KeyMechanism
source§fn clone(&self) -> KeyMechanism
fn clone(&self) -> KeyMechanism
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KeyMechanism
impl Debug for KeyMechanism
source§impl Default for KeyMechanism
impl Default for KeyMechanism
source§fn default() -> KeyMechanism
fn default() -> KeyMechanism
source§impl<'de> Deserialize<'de> for KeyMechanism
impl<'de> Deserialize<'de> for KeyMechanism
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>,
source§impl Display for KeyMechanism
impl Display for KeyMechanism
source§impl<'_derivative_strum> From<&'_derivative_strum KeyMechanism> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum KeyMechanism> for &'static str
source§fn from(x: &'_derivative_strum KeyMechanism) -> &'static str
fn from(x: &'_derivative_strum KeyMechanism) -> &'static str
source§impl From<KeyMechanism> for &'static str
impl From<KeyMechanism> for &'static str
source§fn from(x: KeyMechanism) -> &'static str
fn from(x: KeyMechanism) -> &'static str
source§impl From<KeyMechanism> for KeyMechanism
impl From<KeyMechanism> for KeyMechanism
source§fn from(value: KeyMechanism) -> Self
fn from(value: KeyMechanism) -> Self
source§impl FromStr for KeyMechanism
impl FromStr for KeyMechanism
source§impl Hash for KeyMechanism
impl Hash for KeyMechanism
source§impl IntoEnumIterator for KeyMechanism
impl IntoEnumIterator for KeyMechanism
type Iterator = KeyMechanismIter
fn iter() -> KeyMechanismIter ⓘ
source§impl Ord for KeyMechanism
impl Ord for KeyMechanism
source§fn cmp(&self, other: &KeyMechanism) -> Ordering
fn cmp(&self, other: &KeyMechanism) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for KeyMechanism
impl PartialEq for KeyMechanism
source§impl PartialOrd for KeyMechanism
impl PartialOrd for KeyMechanism
source§impl Serialize for KeyMechanism
impl Serialize for KeyMechanism
source§impl TryFrom<&str> for KeyMechanism
impl TryFrom<&str> for KeyMechanism
impl Copy for KeyMechanism
impl Eq for KeyMechanism
impl StructuralPartialEq for KeyMechanism
Auto Trait Implementations§
impl Freeze for KeyMechanism
impl RefUnwindSafe for KeyMechanism
impl Send for KeyMechanism
impl Sync for KeyMechanism
impl Unpin for KeyMechanism
impl UnwindSafe for KeyMechanism
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)