Struct rand_seeder::SipRng
source · [−]pub struct SipRng { /* private fields */ }
Expand description
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
Auto Trait Implementations
impl RefUnwindSafe for SipRng
impl Send for SipRng
impl Sync for SipRng
impl Unpin for SipRng
impl UnwindSafe for SipRng
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more