pub struct EntropyRule {
pub min_len: usize,
pub threshold: u64,
pub require_mixed_case_and_digit: bool,
}Expand description
The threshold detector: a long unbroken run whose Shannon entropy is above a configurable bound. All three fields are false-positive control.
Fields§
§min_len: usizeThe shortest run considered at all. Below this, entropy per character is noise.
threshold: u64Bits per character, in Q16, at or above which a run is a credential.
require_mixed_case_and_digit: boolWhether a run must mix upper case, lower case and digits to be considered. A hex digest, a ULID and a UUID each fail this and so are never measured.
Implementations§
Source§impl EntropyRule
impl EntropyRule
Trait Implementations§
Source§impl Clone for EntropyRule
impl Clone for EntropyRule
impl Copy for EntropyRule
Source§impl Debug for EntropyRule
impl Debug for EntropyRule
Source§impl Default for EntropyRule
impl Default for EntropyRule
impl Eq for EntropyRule
Source§impl PartialEq for EntropyRule
impl PartialEq for EntropyRule
impl StructuralPartialEq for EntropyRule
Auto Trait Implementations§
impl Forget for EntropyRule
impl Freeze for EntropyRule
impl Move for EntropyRule
impl RefUnwindSafe for EntropyRule
impl Send for EntropyRule
impl Sync for EntropyRule
impl Unpin for EntropyRule
impl UnsafeUnpin for EntropyRule
impl UnwindSafe for EntropyRule
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