Registry / crypto / rc4
library0.2.0rscratesunverified

Pure Rust implementation of the RC4 stream cipher.

# Cargo.toml [dependencies] rc4 = "0.2.0"
INSTALL
IMPORT
SIG · RC4
R
rc4
cryptorustv0.2.0
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.

Rc4
use rc4::Rc4;

Minimal example encrypting data using RC4.

use rc4::Rc4; fn main() { let key = b"secret"; let mut cipher = Rc4::new(key); let mut data = vec![0u8; 16]; cipher.apply_keystream(&mut data); println!("Encrypted: {:?}", data); }
Debug
Known issues
breakingRC4 is cryptographically broken and should not be used for security.
fix
Use a modern cipher like AES-GCM or ChaCha20-Poly1305.
affects: >=0.1.0
Upgrade
Version history
0.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
Amazon
1
Resources
rc4 — cargo add rc4 · libregistry