pub struct ChaCha20 { /* fields omitted */ }
Expand description
Create a new ChaCha20 context.
- The key must be 16 or 32 bytes
- The nonce must be 8 or 12 bytes
Create a new XChaCha20 context.
Key must be 32 bytes and the nonce 24 bytes.
Process the input in place through the cipher xoring
Process the input through the cipher, xoring the byte one-by-one
the output need to be the same size as the input otherwise
this function will panic.
Performs copy-assignment from source
. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.