Skip to main content

Csprng

Trait Csprng 

Source
pub trait Csprng {
    // Required method
    fn fill_bytes(&mut self, out: &mut [u8]);

    // Provided method
    fn next_u64(&mut self) -> u64 { ... }
}
Expand description

Common interface for byte-oriented CSPRNG/DRBG outputs.

Required Methods§

Source

fn fill_bytes(&mut self, out: &mut [u8])

Fill out with pseudorandom bytes.

Provided Methods§

Source

fn next_u64(&mut self) -> u64

Convenience helper for consumers that want one machine word at a time.

Implementors§