Get a single, cryptographically strong, random byte.
This module uses an internal cache to minimize calls against the crypto backend. When the cache is empty, a large number of bytes is requested and handed out one by one. The perfomance benefits of this can be seen in this jsPerf test case.
npm install --save get-random-byte
const getRandomByte = require('get-random-byte')
console.log(getRandomByte())
//=> 112
console.log(getRandomByte())
//=> 143
console.log(getRandomByte())
//=> 205
Return a cryptographically strong random integer between 0 and 255 (inclusivly).