pub enum SecurityLevel {
L128,
L192,
L256,
Custom(u32),
}
Expand description
Security level for KDFs in bits
Variants§
L128
128-bit security level
L192
192-bit security level
L256
256-bit security level
Custom(u32)
Custom security level (in bits)
Implementations§
Source§impl SecurityLevel
impl SecurityLevel
Sourcepub fn recommended_output_size(&self) -> usize
pub fn recommended_output_size(&self) -> usize
Get the recommended output size in bytes for this security level
Sourcepub fn meets_minimum(&self, minimum: SecurityLevel) -> bool
pub fn meets_minimum(&self, minimum: SecurityLevel) -> bool
Check if this security level meets a minimum requirement
Trait Implementations§
Source§impl Clone for SecurityLevel
impl Clone for SecurityLevel
Source§fn clone(&self) -> SecurityLevel
fn clone(&self) -> SecurityLevel
Returns a duplicate of the value. Read more
1.0.0 · 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 SecurityLevel
impl Debug for SecurityLevel
Source§impl Ord for SecurityLevel
impl Ord for SecurityLevel
Source§fn cmp(&self, other: &SecurityLevel) -> Ordering
fn cmp(&self, other: &SecurityLevel) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SecurityLevel
impl PartialEq for SecurityLevel
Source§impl PartialOrd for SecurityLevel
impl PartialOrd for SecurityLevel
impl Copy for SecurityLevel
impl Eq for SecurityLevel
impl StructuralPartialEq for SecurityLevel
Auto Trait Implementations§
impl Freeze for SecurityLevel
impl RefUnwindSafe for SecurityLevel
impl Send for SecurityLevel
impl Sync for SecurityLevel
impl Unpin for SecurityLevel
impl UnwindSafe for SecurityLevel
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