#[non_exhaustive]pub enum KeyHash {
Sha256,
Argon2id(Argon2Params),
}Expand description
How a bearer key is kept.
As configuration it is a map tagged by algorithm, the costs beside it under Argon2id:
{ "algorithm": "sha256" } or { "algorithm": "argon2id", "memory_kib": 65536 }.
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.
Sha256
sha256:<hex>: fast, and enough for a key of 256 random bits. The default.
Argon2id(Argon2Params)
Argon2id with these costs: for a key a person might have chosen. Every presented key then costs one Argon2id verification per Argon2id record it is checked against.
Implementations§
Trait Implementations§
impl Copy for KeyHash
Source§impl Describe for KeyHashwhere
Argon2Params: Fields,
impl Describe for KeyHashwhere
Argon2Params: Fields,
impl Eq for KeyHash
impl StructuralPartialEq for KeyHash
Auto Trait Implementations§
impl Freeze for KeyHash
impl RefUnwindSafe for KeyHash
impl Send for KeyHash
impl Sync for KeyHash
impl Unpin for KeyHash
impl UnsafeUnpin for KeyHash
impl UnwindSafe for KeyHash
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.