Skip to content

Cross browser and node.js implementation to generate random values

Notifications You must be signed in to change notification settings

ProtonMail/get-random-values

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-random-values

Cross browser and node.js implementation to generate random values.

Either uses:

  • window.crypto
  • window.msCrypto
  • node crypto

if it exists, otherwise throws.

Example

import getRandomValues from 'get-random-values';

const array = getRandomValues(new Uint32Array(4));
// [9, 50, 194, 143]

Installation

npm install github:ProtonMail/get-random-values.git#semver:^1.0.0

About

Cross browser and node.js implementation to generate random values

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published