1.0.0 • Published 4 years ago

quantum-random v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

quantum-random Travis CI Build Status

Generate a truly random hexadecimal string. Useful for seeding pseudorandom number generators.

NPM Badge

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.