pub trait EntropySource: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn read_entropy(&self, buffer: &mut [u8]) -> usize;
fn is_available(&self) -> bool;
}Expand description
Trait for entropy sources that can provide random data
Required Methods§
Sourcefn read_entropy(&self, buffer: &mut [u8]) -> usize
fn read_entropy(&self, buffer: &mut [u8]) -> usize
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if this source is available and ready