Struct elastic_elgamal::group::RandomBytesProvider
source · pub struct RandomBytesProvider<'a> { /* private fields */ }
Expand description
Provides an arbitrary number of random bytes.
Unlike RngCore::fill_bytes()
, a single provider can only be used once.
Implementations§
source§impl<'a> RandomBytesProvider<'a>
impl<'a> RandomBytesProvider<'a>
sourcepub fn fill_bytes(self, dest: &mut [u8])
pub fn fill_bytes(self, dest: &mut [u8])
Writes random bytes into the specified buffer. As follows from the signature, this method can only be called once for a provider instance.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RandomBytesProvider<'a>
impl<'a> RefUnwindSafe for RandomBytesProvider<'a>
impl<'a> Send for RandomBytesProvider<'a>
impl<'a> Sync for RandomBytesProvider<'a>
impl<'a> Unpin for RandomBytesProvider<'a>
impl<'a> !UnwindSafe for RandomBytesProvider<'a>
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