Struct rand_chacha::guts::ChaCha
source · pub struct ChaCha {
pub(crate) b: vec128_storage,
pub(crate) c: vec128_storage,
pub(crate) d: vec128_storage,
}
Fields§
§b: vec128_storage
§c: vec128_storage
§d: vec128_storage
Implementations§
source§impl ChaCha
impl ChaCha
pub fn new(key: &[u8; 32], nonce: &[u8]) -> Self
fn pos64<M: Machine>(&self, m: M) -> u64
sourcepub fn refill4(&mut self, drounds: u32, out: &mut [u8; 256])
pub fn refill4(&mut self, drounds: u32, out: &mut [u8; 256])
Produce 4 blocks of output, advancing the state
pub fn set_block_pos(&mut self, value: u64)
pub fn get_block_pos(&self) -> u64
pub fn set_nonce(&mut self, value: u64)
pub fn get_nonce(&self) -> u64
pub fn get_seed(&self) -> [u8; 32]
Trait Implementations§
impl Eq for ChaCha
impl StructuralPartialEq for ChaCha
Auto Trait Implementations§
impl Freeze for ChaCha
impl RefUnwindSafe for ChaCha
impl Send for ChaCha
impl Sync for ChaCha
impl Unpin for ChaCha
impl UnwindSafe for ChaCha
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)