[][src]Struct cryptoxide::chacha20::ChaCha20

pub struct ChaCha20 { /* fields omitted */ }

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]

impl Decryptor for ChaCha20[src]

impl Encryptor for ChaCha20[src]

impl SynchronousStreamCipher for ChaCha20[src]

Auto Trait Implementations

impl Send for ChaCha20

impl Sync for ChaCha20

impl Unpin for ChaCha20

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.