pub struct PasswordStrength {
pub length: usize,
pub entropy: f64,
pub level: StrengthLevel,
pub crack_time_seconds: f64,
pub suggestions: Vec<String>,
}Expand description
Password strength analysis result.
Fields§
§length: usizeLength of the password
entropy: f64Entropy in bits
level: StrengthLevelStrength level
crack_time_seconds: f64Estimated crack time in seconds (with PBKDF2)
suggestions: Vec<String>Improvement suggestions
Implementations§
Source§impl PasswordStrength
impl PasswordStrength
Sourcepub fn crack_time_display(&self) -> String
pub fn crack_time_display(&self) -> String
Human-readable crack time estimate.
Sourcepub const fn is_acceptable(&self) -> bool
pub const fn is_acceptable(&self) -> bool
Whether password meets minimum security threshold (50 bits).
Sourcepub const fn is_recommended(&self) -> bool
pub const fn is_recommended(&self) -> bool
Whether password meets recommended security threshold (72 bits).
Trait Implementations§
Source§impl Clone for PasswordStrength
impl Clone for PasswordStrength
Source§fn clone(&self) -> PasswordStrength
fn clone(&self) -> PasswordStrength
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 moreAuto Trait Implementations§
impl Freeze for PasswordStrength
impl RefUnwindSafe for PasswordStrength
impl Send for PasswordStrength
impl Sync for PasswordStrength
impl Unpin for PasswordStrength
impl UnsafeUnpin for PasswordStrength
impl UnwindSafe for PasswordStrength
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