pub struct DeterministicEntropySource { /* private fields */ }Expand description
Deterministic entropy source for testing
This entropy source provides deterministic bytes from KT128 (KangarooTwelve)
XOF expansion via Kt128Expander and domain crate::kt128_expander::DOMAIN_LIBQ_DET_RNG.
USE CASE: This is designed for:
- Unit testing with reproducible outcomes
- Known Answer Tests (KAT) verification
- Benchmarking with consistent inputs
NOT FOR CRYPTOGRAPHIC USE: For actual cryptographic operations,
use OsEntropySource or other secure entropy sources. Unpredictability is
only as strong as the secrecy of the 32-byte seed.
Implementations§
Trait Implementations§
Source§impl Clone for DeterministicEntropySource
impl Clone for DeterministicEntropySource
Source§fn clone(&self) -> DeterministicEntropySource
fn clone(&self) -> DeterministicEntropySource
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 DeterministicEntropySource
impl Debug for DeterministicEntropySource
Source§impl EntropySource for DeterministicEntropySource
impl EntropySource for DeterministicEntropySource
Source§fn get_entropy(&mut self, dest: &mut [u8]) -> Result<()>
fn get_entropy(&mut self, dest: &mut [u8]) -> Result<()>
Get entropy from the source Read more
Source§fn initialize(&mut self, config: &EntropyConfig) -> Result<()>
fn initialize(&mut self, config: &EntropyConfig) -> Result<()>
Initialize the entropy source Read more
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the entropy source is available Read more
Source§fn source_type(&self) -> EntropySourceType
fn source_type(&self) -> EntropySourceType
Get the entropy source’s type Read more
Source§fn max_entropy_per_call(&self) -> Option<usize>
fn max_entropy_per_call(&self) -> Option<usize>
Get the maximum entropy that can be obtained in one call Read more
Source§fn requires_initialization(&self) -> bool
fn requires_initialization(&self) -> bool
Check if the entropy source requires initialization Read more
Auto Trait Implementations§
impl Freeze for DeterministicEntropySource
impl RefUnwindSafe for DeterministicEntropySource
impl Send for DeterministicEntropySource
impl Sync for DeterministicEntropySource
impl Unpin for DeterministicEntropySource
impl UnsafeUnpin for DeterministicEntropySource
impl UnwindSafe for DeterministicEntropySource
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