[−][src]Struct cryptoxide::chacha20::ChaCha20
ChaCha Context
Implementations
impl ChaCha20
[src]
pub fn new(key: &[u8], nonce: &[u8]) -> ChaCha20
[src]
Create a new ChaCha20 context.
- The key must be 16 or 32 bytes
- The nonce must be 8 or 12 bytes
pub fn new_xchacha20(key: &[u8], nonce: &[u8]) -> ChaCha20
[src]
Create a new XChaCha20 context.
Key must be 32 bytes and the nonce 24 bytes.
impl ChaCha20
[src]
pub fn process_mut(&mut self, data: &mut [u8])
[src]
Trait Implementations
impl Clone for ChaCha20
[src]
fn clone(&self) -> ChaCha20
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Decryptor for ChaCha20
[src]
fn decrypt(
&mut self,
input: &mut RefReadBuffer,
output: &mut RefWriteBuffer,
_: bool
) -> Result<BufferResult, SymmetricCipherError>
[src]
&mut self,
input: &mut RefReadBuffer,
output: &mut RefWriteBuffer,
_: bool
) -> Result<BufferResult, SymmetricCipherError>
impl Encryptor for ChaCha20
[src]
fn encrypt(
&mut self,
input: &mut RefReadBuffer,
output: &mut RefWriteBuffer,
_: bool
) -> Result<BufferResult, SymmetricCipherError>
[src]
&mut self,
input: &mut RefReadBuffer,
output: &mut RefWriteBuffer,
_: bool
) -> Result<BufferResult, SymmetricCipherError>
impl SynchronousStreamCipher for ChaCha20
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,