Struct sgx_rand::isaac::Isaac64Rng
source · [−]pub struct Isaac64Rng { /* private fields */ }
Expand description
A random number generator that uses ISAAC-64[1], the 64-bit variant of the ISAAC algorithm.
The ISAAC algorithm is generally accepted as suitable for
cryptographic purposes, but this implementation has not be
verified as such. Prefer a generator like OsRng
that defers to
the operating system for cases that need high security.
[1]: Bob Jenkins, ISAAC: A fast cryptographic random number generator
Implementations
sourceimpl Isaac64Rng
impl Isaac64Rng
sourcepub fn new_unseeded() -> Isaac64Rng
pub fn new_unseeded() -> Isaac64Rng
Create a 64-bit ISAAC random number generator using the default fixed seed.
Trait Implementations
sourceimpl Clone for Isaac64Rng
impl Clone for Isaac64Rng
sourcefn clone(&self) -> Isaac64Rng
fn clone(&self) -> Isaac64Rng
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for Isaac64Rng
impl Debug for Isaac64Rng
sourceimpl Rand for Isaac64Rng
impl Rand for Isaac64Rng
sourceimpl Rng for Isaac64Rng
impl Rng for Isaac64Rng
sourcefn next_f32(&mut self) -> f32
fn next_f32(&mut self) -> f32
[0, 1)
. Read moresourcefn next_f64(&mut self) -> f64
fn next_f64(&mut self) -> f64
[0, 1)
. Read moresourcefn fill_bytes(&mut self, dest: &mut [u8])
fn fill_bytes(&mut self, dest: &mut [u8])
dest
with random data. Read moresourcefn gen<T: Rand>(&mut self) -> Twhere
Self: Sized,
fn gen<T: Rand>(&mut self) -> Twhere
Self: Sized,
Rand
type. Read moresourcefn gen_iter<T: Rand>(&mut self) -> Generator<'_, T, Self>ⓘNotable traits for Generator<'a, T, R>impl<'a, T: Rand, R: Rng> Iterator for Generator<'a, T, R> type Item = T;
where
Self: Sized,
fn gen_iter<T: Rand>(&mut self) -> Generator<'_, T, Self>ⓘNotable traits for Generator<'a, T, R>impl<'a, T: Rand, R: Rng> Iterator for Generator<'a, T, R> type Item = T;
where
Self: Sized,
sourcefn gen_range<T: PartialOrd + SampleRange>(&mut self, low: T, high: T) -> Twhere
Self: Sized,
fn gen_range<T: PartialOrd + SampleRange>(&mut self, low: T, high: T) -> Twhere
Self: Sized,
sourcefn gen_weighted_bool(&mut self, n: u32) -> boolwhere
Self: Sized,
fn gen_weighted_bool(&mut self, n: u32) -> boolwhere
Self: Sized,
sourcefn gen_ascii_chars(&mut self) -> AsciiGenerator<'_, Self>ⓘNotable traits for AsciiGenerator<'a, R>impl<'a, R: Rng> Iterator for AsciiGenerator<'a, R> type Item = char;
where
Self: Sized,
fn gen_ascii_chars(&mut self) -> AsciiGenerator<'_, Self>ⓘNotable traits for AsciiGenerator<'a, R>impl<'a, R: Rng> Iterator for AsciiGenerator<'a, R> type Item = char;
where
Self: Sized,
sourcefn choose<'a, T>(&mut self, values: &'a [T]) -> Option<&'a T>where
Self: Sized,
fn choose<'a, T>(&mut self, values: &'a [T]) -> Option<&'a T>where
Self: Sized,
values
. Read moresourceimpl<'a> SeedableRng<&'a [u64]> for Isaac64Rng
impl<'a> SeedableRng<&'a [u64]> for Isaac64Rng
sourcefn from_seed(seed: &'a [u64]) -> Isaac64Rng
fn from_seed(seed: &'a [u64]) -> Isaac64Rng
Create an ISAAC random number generator with a seed. This can be any length, although the maximum number of elements used is 256 and any more will be silently ignored. A generator constructed with a given seed will generate the same sequence of values as all other generators constructed with that seed.