pub struct ChaCha { /* private fields */ }
Expand description
D.J. Bernstein’s ChaCha block cipher.
Implementations§
source§impl ChaCha
impl ChaCha
sourcepub const BLOCK_SIZE: usize = 64usize
pub const BLOCK_SIZE: usize = 64usize
ChaCha block size in bytes.
sourcepub const NONCE_SIZE: usize = 8usize
pub const NONCE_SIZE: usize = 8usize
ChaCha nonce size in bytes.
sourcepub fn with_key_and_nonce(key: &[u8], nonce: &[u8]) -> Result<Self>
pub fn with_key_and_nonce(key: &[u8], nonce: &[u8]) -> Result<Self>
Create a new instance with key
.
Trait Implementations§
Auto Trait Implementations§
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