pub enum Algorithm {
Show 13 variants
RSA1_5,
RSA_OAEP,
RSA_OAEP_256,
A128KW,
A192KW,
A256KW,
DirectSymmetricKey,
ECDH_ES,
ECDH_ES_A128KW,
ECDH_ES_A192KW,
ECDH_ES_A256KW,
AesGcmKw(AesGcmKwAlgorithm),
Pbes2(Pbes2Algorithm),
}
Expand description
Algorithms for key management as defined in RFC7518#4
Variants§
RSA1_5
RSAES-PKCS1-v1_5
RSA_OAEP
RSAES OAEP using default parameters
RSA_OAEP_256
RSAES OAEP using SHA-256 and MGF1 with SHA-256
A128KW
AES Key Wrap using 128-bit key. Unsupported
A192KW
AES Key Wrap using 192-bit key. Unsupported.
This is not supported by ring
.
A256KW
AES Key Wrap using 256-bit key. Unsupported
DirectSymmetricKey
Direct use of a shared symmetric key
ECDH_ES
ECDH-ES using Concat KDF
ECDH_ES_A128KW
ECDH-ES using Concat KDF and “A128KW” wrapping
ECDH_ES_A192KW
ECDH-ES using Concat KDF and “A192KW” wrapping
ECDH_ES_A256KW
ECDH-ES using Concat KDF and “A256KW” wrapping
AesGcmKw(AesGcmKwAlgorithm)
Key wrapping with AES GCM. RFC7518#4.7
Pbes2(Pbes2Algorithm)
PBES2 with HMAC SHA and AES key-wrapping. RFC7518#4.8
Implementations§
Source§impl Algorithm
impl Algorithm
Sourcepub fn algorithm_type(self) -> AlgorithmType
pub fn algorithm_type(self) -> AlgorithmType
Returns the type of operations that the algorithm is intended to support
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Algorithm
impl<'de> Deserialize<'de> for Algorithm
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 From<AesGcmKwAlgorithm> for Algorithm
impl From<AesGcmKwAlgorithm> for Algorithm
Source§fn from(a: AesGcmKwAlgorithm) -> Self
fn from(a: AesGcmKwAlgorithm) -> Self
Converts to this type from the input type.
Source§impl From<Pbes2Algorithm> for Algorithm
impl From<Pbes2Algorithm> for Algorithm
Source§fn from(p: Pbes2Algorithm) -> Self
fn from(p: Pbes2Algorithm) -> Self
Converts to this type from the input type.
impl Copy for Algorithm
impl Eq for Algorithm
impl StructuralPartialEq for Algorithm
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnwindSafe for Algorithm
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.