ChaCha20
A Rust implementation of the ChaCha20 stream cipher. Complete with simple, auditable code.
Features
- Stack-allocated
- No unsafe code blocks
- Zero dependencies
- Seek an index in the keystream or a block in the keystream.
Usage
use ChaCha20;
let key = decode.unwrap;
let key: = key.try_into.unwrap;
let nonce = decode.unwrap;
let nonce: = nonce.try_into.unwrap;
let seek = 42; // start the cipher at the 42nd index
let mut chacha = new;
let mut binding = *b"Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it.";
let to = binding.as_mut_slice;
chacha.apply_keystream;
chacha.seek; // move the keystream index back to 42