[−][src]Struct rand_seeder::SipRng
A generator built using SipHash's primitives.
SipRng
is statistically high-quality, passing practrand tests to at
least 4 TiB. It is also reasonably fast, though not quite competitive with
the best non-cryptographic RNGs or optimised block RNGs such as ChaCha.
This implementation is fixed to use two "compression" rounds between output
values (similar to SipHash 2-4). Construction via SipHasher::into_rng
adds two extra rounds to maintain four rounds between final input
consumption and the first output, however this first result is not identical
to SipHash's result.
Although this generator is heavily based on the design of SipHash, it has not been reviewed for cryptographic strength, and thus cannot be recommended for applications requiring this property.
Trait Implementations
impl Clone for SipRng
[src]
pub fn clone(&self) -> SipRng
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SipRng
[src]
impl RngCore for SipRng
[src]
pub fn next_u32(&mut self) -> u32
[src]
pub fn next_u64(&mut self) -> u64
[src]
pub fn fill_bytes(&mut self, dest: &mut [u8])
[src]
pub fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>
[src]
impl SeedableRng for SipRng
[src]
type Seed = [u8; 32]
Seed type, which is restricted to types mutably-dereferencable as u8
arrays (we recommend [u8; N]
for some N
). Read more
pub fn from_seed(seed: Self::Seed) -> Self
[src]
pub fn seed_from_u64(state: u64) -> Self
[src]
pub fn from_rng<R>(rng: R) -> Result<Self, Error> where
R: RngCore,
[src]
R: RngCore,
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,