Registry / crypto / rand-hc

rand-hc

JSON →
library0.5.1rscratesunverified

HC128 random number generator.

# Cargo.toml [dependencies] rand_hc = "0.5.1"
INSTALL
IMPORT
SIG · RAND-HC
R
rand-hc
cryptorustv0.5.1
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.

Hc128Rng
use rand_hc::Hc128Rng;

Generates random numbers using the HC128 cipher.

use rand_hc::Hc128Rng; use rand::SeedableRng; fn main() { let mut rng = Hc128Rng::from_seed([0; 32]); println!("Random u32: {}", rng.gen::<u32>()); }
Debug
Known issues
gotchaRequires `rand` crate for `SeedableRng` and `gen` trait.
fix
Add `rand` as a dependency and import `rand::SeedableRng`.
affects: >=0.5.0
Upgrade
Version history
0.5.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
Resources
rand-hc — cargo add rand-hc · libregistry