pub struct ChaCha20 { /* private fields */ }
Expand description
Daniel J. Bernstein’s ChaCha20 adapted as a deterministic random number generator.
Examples
let mut rng = urandom::rng::ChaCha20::new();
let value: i32 = rng.next();
Implementations
sourceimpl ChaCha20
impl ChaCha20
sourcepub fn new() -> Random<ChaCha20>ⓘNotable traits for Random<R>impl<R: Rng> Read for Random<R>
pub fn new() -> Random<ChaCha20>ⓘNotable traits for Random<R>impl<R: Rng> Read for Random<R>
Creates a new instance seeded securely from system entropy.
See the SeedRng
trait for more information.
Trait Implementations
sourceimpl Rng for ChaCha20
impl Rng for ChaCha20
sourceimpl SeedRng for ChaCha20
impl SeedRng for ChaCha20
sourcefn new() -> Random<ChaCha20>ⓘNotable traits for Random<R>impl<R: Rng> Read for Random<R>
fn new() -> Random<ChaCha20>ⓘNotable traits for Random<R>impl<R: Rng> Read for Random<R>
Creates a new instance seeded securely from system entropy. Read more
Auto Trait Implementations
impl RefUnwindSafe for ChaCha20
impl Send for ChaCha20
impl Sync for ChaCha20
impl Unpin for ChaCha20
impl UnwindSafe for ChaCha20
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more