Trait SecureRandom
Source pub trait SecureRandom: SecureRandom {
// Required methods
fn fill(&self, dest: &mut [u8]) -> Result<(), Unspecified>;
fn mut_fill(&mut self, dest: &mut [u8]) -> Result<(), Unspecified>;
}
Expand description
A secure random number generator.
Fills dest with random bytes.
§Errors
error::Unspecified if unable to fill dest.
Available on crate feature dev-tests-only only.
Fills dest with random bytes.
This method is only available when the dev-tests-only feature is enabled.
§Errors
error::Unspecified if unable to fill dest.