Registry / crypto / c2-chacha

c2-chacha

JSON →
library0.3.3rscratesunverified

The ChaCha family of stream ciphers.

# Cargo.toml [dependencies] c2-chacha = "0.3.3"
INSTALL
IMPORT
SIG · C2-CHACHA
C
c2-chacha
cryptorustv0.3.3
harness data pending
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.

Upgrade
Version history
0.3.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
Amazon
1
Resources
c2-chacha — cargo add c2-chacha · libregistry