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

pub struct ChaCha20 { /* fields omitted */ }
Expand description

ChaCha Context

Implementations

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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.