Trait Variant

pub trait Variant: Sealed

A trait that distinguishes some ChaCha variants. Contains configurations for "Legacy" DJB variant and the IETF variant.

Associated Types

type Counter: Copy;

The counter's type.

Required Methods

fn get_block_pos(row: &[u32]) -> Self::Counter

Takes a slice of state[12..NONCE_INDEX] to convert it into Self::Counter.

fn set_block_pos(row: &mut [u32], pos: Self::Counter)

Breaks down the Self::Counter type into a u32 array for setting the block pos.

fn remaining_blocks(block_pos: Self::Counter) -> Option<usize>

A helper method for calculating the remaining blocks using these types

Implementors