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 |
#897 in Development tools
509,111 downloads per month
Used in 468 crates
(7 directly)
16KB
101 lines
Hmac DRBG
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
~420KB