Skip to content

kenany/secure-random-octet

Repository files navigation

secure-random-octet

Generate a cryptographically secure octet.

Example

var secureRandomOctet = require('secure-random-octet');

secureRandomOctet();
// => 4

Installation

$ npm install secure-random-octet

API

var secureRandomOctet = require('secure-random-octet');

secureRandomOctet()

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