UNPKG

entropy-string

Version:

Efficiently generate cryptographically strong random strings of specified entropy from various character sets.

9 lines (7 loc) 178 B
"use strict"; var csprngBytes = function csprngBytes(count) { return window.crypto.getRandomValues(new Uint8Array(count)); }; module.exports = { csprngBytes: csprngBytes };