Skip to main content

EntropySource

Trait EntropySource 

Source
pub trait EntropySource {
    // Required method
    fn fill(&mut self, dst: &mut [u8]);
}
Expand description

Fills dst with unpredictable bytes suitable for cryptographic seeding.

Required Methods§

Source

fn fill(&mut self, dst: &mut [u8])

Writes entropy into every byte of dst.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl EntropySource for StdEntropy

Available on crate feature std only.
Source§

impl EntropySource for TestEntropySource