hmac-drbg 0.3.0

Pure Rust implementation of Hmac DRBG.
Documentation

Hmac DRBG

Build Status License Cargo

Pure Rust Hmac DRBG implementation with support of no_std.

Usage

Add hmac-drbg = "0.1" dependency.

let mut drbg = HmacDRBG::<Sha256>::new(
    "totally random0123456789".as_bytes(),
    "secret nonce".as_bytes(),
    "my drbg".as_bytes());
assert_eq!(drbg.generate::<U32>(None).as_slice(), read_hex("018ec5f8e08c41e5ac974eb129ac297c5388ee1864324fa13d9b15cf98d9a157").unwrap().as_slice());