secure-random-uint

Generate a cryptographically secure uint

MIT License

Downloads
7
Stars
1
Committers
3

secure-random-uint

Generate a cryptographically secure uint.

Example

var secureRandomUint = require('secure-random-uint');

secureRandomUint();
// => 4

Installation

$ npm install secure-random-uint

API

var secureRandomUint = require('secure-random-uint');

secureRandomUint()

Returns a cryptographically secure Number uint. Uses get-random-values, so an Error will be thrown if there is no secure random number generator available.