rand-esdm

Crates.iorand-esdm
lib.rsrand-esdm
version0.1.5
sourcesrc
created_at2023-08-10 17:47:09.097321
updated_at2024-07-23 14:25:42.766306
descriptionprovides interface to ESDM RNG server
homepage
repositoryhttps://github.com/thillux/rand-esdm
max_upload_size
id941217
size15,342
Markus Theil (thillux)

documentation

README

rand-esdm

crates.io

About

A small library for interfacing Rust with the ESDM user-space random server.

It currently provides the minimal amount of bindings necessary to use ESDM together with the rand crate.

Usage Example

Add rand-esdm to your Cargo.toml

rand-esdm = "0.0.3"

Generate Random Numbers with rand crate

Choose type of rng:

  • Only usable when fully seeded: let mut rng = EsdmRng::new(EsdmRngType::FullySeeded);
  • Only usable with fresh entropy: let mut rng = EsdmRng::new(EsdmRngType::PredictionResistant);

Include Rng utility trait from rand:

use rand::Rng;

Draw random numbers as needed, e.g.:

let rnd: u64 = rng.gen();
Commit count: 59

cargo fmt