pub struct Blake2bRng<T: Blake2b> { /* private fields */ }Expand description
Blake2b-based random number generator.
Trait Implementations§
Source§impl<T: Blake2b> Rng<BabyBear> for Blake2bRng<T>
impl<T: Blake2b> Rng<BabyBear> for Blake2bRng<T>
Source§fn random_bits(&mut self, bits: usize) -> u32
fn random_bits(&mut self, bits: usize) -> u32
Get a cryptographically uniform set of bits, as the low order bits of a
u32
Source§fn random_elem(&mut self) -> BabyBearElem
fn random_elem(&mut self) -> BabyBearElem
Get a cryptographically uniform field element
Source§fn random_ext_elem(&mut self) -> BabyBearExtElem
fn random_ext_elem(&mut self) -> BabyBearExtElem
Get a cryptographically uniform extension field element
Auto Trait Implementations§
impl<T> Freeze for Blake2bRng<T>
impl<T> RefUnwindSafe for Blake2bRng<T>where
T: RefUnwindSafe,
impl<T> Send for Blake2bRng<T>
impl<T> Sync for Blake2bRng<T>
impl<T> Unpin for Blake2bRng<T>where
T: Unpin,
impl<T> UnwindSafe for Blake2bRng<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<R> TryRngCore for R
impl<R> TryRngCore for R
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of a RNG error.
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
Return the next random
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
Return the next random
u64.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
Fill
dest entirely with random data.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
Wrap RNG with the
UnwrapMut wrapper.