secure-random-bytes

Retrieve a secure random byte string of a specified length


Keywords
crypto, random
License
MIT
Install
npm install secure-random-bytes@2.0.0

Documentation

secure-random-bytes

Retrieve a secure random byte string of a specified length.

Example

var randomBytes = require('secure-random-bytes');

randomBytes(10);
// => 'ÊïÜsóÐ\u0006\u0016mÏ'

Installation

$ npm install secure-random-bytes

API

var randomBytes = require('secure-random-bytes');

randomBytes(length)

Returns a String (whose length is length) of random bytes.