pub struct EntropyQuality {
pub overall: f64,
pub uniformity: f64,
pub independence: f64,
pub predictability: f64,
}Expand description
Entropy quality assessment result
Fields§
§overall: f64Overall quality score (0.0 to 1.0)
uniformity: f64Uniformity score (0.0 to 1.0)
independence: f64Independence score (0.0 to 1.0)
predictability: f64Predictability score (0.0 to 1.0, lower is better)
Implementations§
Source§impl EntropyQuality
impl EntropyQuality
Sourcepub fn new(
overall: f64,
uniformity: f64,
independence: f64,
predictability: f64,
) -> Self
pub fn new( overall: f64, uniformity: f64, independence: f64, predictability: f64, ) -> Self
Create a new entropy quality assessment
Sourcepub fn is_acceptable(&self, threshold: f64) -> bool
pub fn is_acceptable(&self, threshold: f64) -> bool
Check if the entropy quality is acceptable for cryptographic use
Sourcepub fn is_excellent(&self) -> bool
pub fn is_excellent(&self) -> bool
Check if the entropy quality is excellent
Trait Implementations§
Source§impl Clone for EntropyQuality
impl Clone for EntropyQuality
Source§fn clone(&self) -> EntropyQuality
fn clone(&self) -> EntropyQuality
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 EntropyQuality
impl Debug for EntropyQuality
Source§impl Display for EntropyQuality
impl Display for EntropyQuality
Source§impl PartialEq for EntropyQuality
impl PartialEq for EntropyQuality
Source§fn eq(&self, other: &EntropyQuality) -> bool
fn eq(&self, other: &EntropyQuality) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for EntropyQuality
impl PartialOrd for EntropyQuality
impl Copy for EntropyQuality
impl StructuralPartialEq for EntropyQuality
Auto Trait Implementations§
impl Freeze for EntropyQuality
impl RefUnwindSafe for EntropyQuality
impl Send for EntropyQuality
impl Sync for EntropyQuality
impl Unpin for EntropyQuality
impl UnsafeUnpin for EntropyQuality
impl UnwindSafe for EntropyQuality
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