pub struct ChaChaCore<R: Rounds, V: Variant> { /* private fields */ }Expand description
The ChaCha core function.
Implementations§
Source§impl<R: Rounds, V: Variant> ChaChaCore<R, V>
impl<R: Rounds, V: Variant> ChaChaCore<R, V>
Sourcepub fn get_block_pos(&self) -> V::Counter
pub fn get_block_pos(&self) -> V::Counter
Get the current block position.
Sourcepub fn set_block_pos(&mut self, pos: V::Counter)
pub fn set_block_pos(&mut self, pos: V::Counter)
Set the block position.
Trait Implementations§
Source§impl<R: Rounds, V: Variant> SeedableRng for ChaChaCore<R, V>
impl<R: Rounds, V: Variant> SeedableRng for ChaChaCore<R, V>
Source§type Seed = [u8; 32]
type Seed = [u8; 32]
Seed type, which is restricted to types mutably-dereferenceable as
u8
arrays (we recommend [u8; N] for some N). Read moreSource§fn seed_from_u64(state: u64) -> Self
fn seed_from_u64(state: u64) -> Self
Create a new PRNG using a
u64 seed. Read moreAuto Trait Implementations§
impl<R, V> Freeze for ChaChaCore<R, V>
impl<R, V> RefUnwindSafe for ChaChaCore<R, V>where
R: RefUnwindSafe,
V: RefUnwindSafe,
impl<R, V> Send for ChaChaCore<R, V>
impl<R, V> Sync for ChaChaCore<R, V>
impl<R, V> Unpin for ChaChaCore<R, V>
impl<R, V> UnwindSafe for ChaChaCore<R, V>where
R: UnwindSafe,
V: 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