Registry / crypto / salsa20

salsa20

JSON →
library0.11.0rscratesunverified

Pure Rust implementation of the Salsa20 stream cipher.

# Cargo.toml [dependencies] salsa20 = "0.11.0"
INSTALL
IMPORT
SIG · SALSA20
S
salsa20
cryptorustv0.11.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.

Salsa20
✓ use salsa20::Salsa20;

Encrypts data using the Salsa20 stream cipher.

use salsa20::Salsa20; use cipher::{KeyIvInit, StreamCipher}; let key = [0u8; 32]; let iv = [0u8; 8]; let mut cipher = Salsa20::new(&key.into(), &iv.into()); let mut data = [0u8; 64]; cipher.apply_keystream(&mut data); println!("Encrypted data: {:?}", data);
Debug
Known issues
gotchaRequires the `cipher` crate for trait imports like KeyIvInit and StreamCipher.
fix
Add `cipher` as a dependency and import the necessary traits.
affects: >=0.11.0
Upgrade
Version history
0.11.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
20
Resources
salsa20 — cargo add salsa20 · libregistry