Struct rand::isaac::IsaacRng
[−]
[src]
pub struct IsaacRng { cnt: u32, rsl: [w32; RAND_SIZE_USIZE], mem: [w32; RAND_SIZE_USIZE], a: w32, b: w32, c: w32, }
rand
): use rand
from crates.io
A random number generator that uses the ISAAC algorithm[1].
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
Fields
cnt | Unstable ( rand ): use |
rsl | Unstable ( rand ): use |
mem | Unstable ( rand ): use |
a | Unstable ( rand ): use |
b | Unstable ( rand ): use |
c | Unstable ( rand ): use |
Methods
impl IsaacRng
fn new_unseeded() -> IsaacRng
rand
): use rand
from crates.io
Create an ISAAC random number generator using the default fixed seed.
fn init(&mut self, use_rsl: bool)
rand
): use rand
from crates.io
Initialises self
. If use_rsl
is true, then use the current value
of rsl
as a seed, otherwise construct one algorithmically (not
randomly).
fn isaac(&mut self)
rand
): use rand
from crates.io
Refills the output buffer (self.rsl
)