Struct zxcvbn::time_estimates::CrackTimes
source · [−]pub struct CrackTimes { /* private fields */ }
Expand description
Back-of-the-envelope crack time estimations, in seconds, based on a few scenarios.
Implementations
sourceimpl CrackTimes
impl CrackTimes
sourcepub fn new(guesses: u64) -> Self
pub fn new(guesses: u64) -> Self
Get the time needed to crack a password based on the amount of guesses needed.
Arguments
guesses
- The number of guesses needed to crack a password.
sourcepub fn online_throttling_100_per_hour(self) -> CrackTimeSeconds
pub fn online_throttling_100_per_hour(self) -> CrackTimeSeconds
Online attack on a service that rate-limits password attempts.
sourcepub fn online_no_throttling_10_per_second(self) -> CrackTimeSeconds
pub fn online_no_throttling_10_per_second(self) -> CrackTimeSeconds
Online attack on a service that doesn’t rate-limit, or where an attacker has outsmarted rate-limiting.
sourcepub fn offline_slow_hashing_1e4_per_second(self) -> CrackTimeSeconds
pub fn offline_slow_hashing_1e4_per_second(self) -> CrackTimeSeconds
Offline attack, assumes multiple attackers. Proper user-unique salting, and a slow hash function such as bcrypt, scrypt, PBKDF2.
sourcepub fn offline_fast_hashing_1e10_per_second(self) -> CrackTimeSeconds
pub fn offline_fast_hashing_1e10_per_second(self) -> CrackTimeSeconds
Offline attack with user-unique salting but a fast hash function such as SHA-1, SHA-256, or MD5. A wide range of reasonable numbers anywhere from one billion to one trillion guesses per second, depending on number of cores and machines, ballparking at 10 billion per second.
Trait Implementations
sourceimpl Clone for CrackTimes
impl Clone for CrackTimes
sourcefn clone(&self) -> CrackTimes
fn clone(&self) -> CrackTimes
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CrackTimes
impl Debug for CrackTimes
sourceimpl Hash for CrackTimes
impl Hash for CrackTimes
sourceimpl PartialEq<CrackTimes> for CrackTimes
impl PartialEq<CrackTimes> for CrackTimes
sourcefn eq(&self, other: &CrackTimes) -> bool
fn eq(&self, other: &CrackTimes) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CrackTimes) -> bool
fn ne(&self, other: &CrackTimes) -> bool
This method tests for !=
.
impl Copy for CrackTimes
impl Eq for CrackTimes
impl StructuralEq for CrackTimes
impl StructuralPartialEq for CrackTimes
Auto Trait Implementations
impl RefUnwindSafe for CrackTimes
impl Send for CrackTimes
impl Sync for CrackTimes
impl Unpin for CrackTimes
impl UnwindSafe for CrackTimes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more