Deterministic Random Bit Generators
npm install drbg.js



Deterministic Random Bits Generators
Based on NIST Recommended DRBG from NIST SP800-90A with the following properties:
* CTR DRBG with DF with AES-128, AES-192, AES-256 cores see issue #1
* Hash DRBG with DF with SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 cores
* HMAC DRBG with SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 cores
* with and without prediction resistance
``shell`
npm install drbg.js
`javascript
var drbgs = require('drbg.js') // import HashDRBG and HmacDRBG
var HashDRBG = drbgs.HashDRBG // or require('drbg.js/hash')
var HmacDRBG = drbgs.HmacDRBG // or require('drbg.js/hmac')
var drbg2 = new HashDRBG('sha256', entropy, nonce, personalization_data)
drbg2.generate(5, additional_data) //
drbg2.reseed(entropy, personalization_data)
drbg2.generate(5, additional_data) //
var drbg3 = new HmacDRBG('sha256', entropy, nonce, personalization_data)
drbg3.generate(5, additional_data) //
drbg3.reseed(entropy, personalization_data)
drbg3.generate(5, additional_data) //
``
This library is free and open-source software released under the MIT license.