npm.io
7.0.2 • Published 1 week ago

secure-random-bytes

Licence
MIT
Version
7.0.2
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
1

secure-random-bytes

Retrieve a secure random byte string of a specified length.

Example

const randomBytes = require("secure-random-bytes");

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

Installation

$ npm install secure-random-bytes

API

const randomBytes = require("secure-random-bytes");
randomBytes(length)

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

Keywords