pub trait EntropySource:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn fill_bytes(&self, dest: &mut [u8]);
fn next_u64(&self) -> u64;
fn fork(&self, task_id: TaskId) -> Arc<dyn EntropySource>;
fn source_id(&self) -> &'static str;
}Expand description
Core trait for entropy providers.
Required Methods§
Sourcefn fill_bytes(&self, dest: &mut [u8])
fn fill_bytes(&self, dest: &mut [u8])
Fill a buffer with entropy bytes.
Sourcefn fork(&self, task_id: TaskId) -> Arc<dyn EntropySource>
fn fork(&self, task_id: TaskId) -> Arc<dyn EntropySource>
Fork this entropy source deterministically for a child task.