#hmac

hmac-drbg

Pure Rust implementation of Hmac DRBG

5 unstable releases

0.3.0 Jun 15, 2020
0.2.0 Sep 26, 2019
0.1.2 Nov 8, 2017
0.1.1 Nov 8, 2017
0.1.0 Nov 7, 2017

#645 in Cryptography

Download history 43157/week @ 2022-08-02 44993/week @ 2022-08-09 41991/week @ 2022-08-16 43406/week @ 2022-08-23 40641/week @ 2022-08-30 41526/week @ 2022-09-06 39894/week @ 2022-09-13 44449/week @ 2022-09-20 45557/week @ 2022-09-27 46495/week @ 2022-10-04 46038/week @ 2022-10-11 43186/week @ 2022-10-18 41129/week @ 2022-10-25 39272/week @ 2022-11-01 44295/week @ 2022-11-08 36880/week @ 2022-11-15

169,233 downloads per month
Used in 329 crates (6 directly)

Apache-2.0

16KB
101 lines

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());

Dependencies

~360KB