pub struct EntropyValidator { /* private fields */ }Expand description
Comprehensive entropy validator
This validator performs multiple statistical tests to assess the quality of entropy in random data, ensuring it meets cryptographic requirements.
Implementations§
Source§impl EntropyValidator
impl EntropyValidator
Sourcepub fn with_settings(
min_entropy_bits: usize,
max_entropy_bits: usize,
quality_threshold: f64,
strict_mode: bool,
) -> Self
pub fn with_settings( min_entropy_bits: usize, max_entropy_bits: usize, quality_threshold: f64, strict_mode: bool, ) -> Self
Create a new entropy validator with custom settings
Sourcepub fn validate_entropy(&self, data: &[u8]) -> Result<EntropyQuality>
pub fn validate_entropy(&self, data: &[u8]) -> Result<EntropyQuality>
Sourcepub fn is_strict_mode(&self) -> bool
pub fn is_strict_mode(&self) -> bool
Check if the validator is in strict mode
Sourcepub fn quality_threshold(&self) -> f64
pub fn quality_threshold(&self) -> f64
Get the quality threshold
Sourcepub fn min_entropy_bits(&self) -> usize
pub fn min_entropy_bits(&self) -> usize
Get the minimum entropy bits required
Sourcepub fn max_entropy_bits(&self) -> usize
pub fn max_entropy_bits(&self) -> usize
Get the maximum entropy bits for validation
Trait Implementations§
Source§impl Clone for EntropyValidator
impl Clone for EntropyValidator
Source§fn clone(&self) -> EntropyValidator
fn clone(&self) -> EntropyValidator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EntropyValidator
impl Debug for EntropyValidator
Auto Trait Implementations§
impl Freeze for EntropyValidator
impl RefUnwindSafe for EntropyValidator
impl Send for EntropyValidator
impl Sync for EntropyValidator
impl Unpin for EntropyValidator
impl UnsafeUnpin for EntropyValidator
impl UnwindSafe for EntropyValidator
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