quantum-random
v1.0.0
Published
Generate a truly random hexadecimal string.
Downloads
32
Maintainers
Readme
quantum-random
Generate a truly random hexadecimal string. Useful for seeding pseudorandom number generators.
Install
npm install quantum-random
Usage
const quantumRandom = require("quantum-random")
const Chance = require("chance")
const chance = new Chance(await quantumRandom({ size: 19937 }))
API
quantumRandom(options?)
Get a randomly generated hexadecimal string. Returns a promise that resolves with a string.
options
Type: object
size
Type: number
Default: 1024
The amount of hexadecimal characters to generate. If used to seed a pseudorandom number generator, it should ideally be equal to the state length of the algorithm used.