Skip to main content

SecureRandom

Trait SecureRandom 

pub trait SecureRandom: SecureRandom {
    // Required method
    fn fill(&self, dest: &mut [u8]) -> Result<(), Unspecified>;
}
Available on crate features aws-lc and crypto only.
Expand description

A secure random number generator.

Required Methods§

fn fill(&self, dest: &mut [u8]) -> Result<(), Unspecified>

Fills dest with random bytes.

§Errors

error::Unspecified if unable to fill dest.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

§

impl<T> SecureRandom for T
where T: SecureRandom,