Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ChaCha20
✓ use c2_chacha::ChaCha20;
Encrypts data using ChaCha20 stream cipher.
use c2_chacha::ChaCha20;
use cipher::{KeyIvInit, StreamCipher};
fn main() {
let key = [0u8; 32];
let iv = [0u8; 12];
let mut cipher = ChaCha20::new(&key.into(), &iv.into()).unwrap();
let mut data = b"hello world".to_vec();
cipher.apply_keystream(&mut data);
println!("Encrypted: {:?}", data);
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.