UNPKG

entropy-string

Version:

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

9 lines (5 loc) 192 B
// 128 bit const { Entropy } = require('./entropy-string') const entropy = new Entropy({ bits: 128 }) const string = entropy.string() console.log(`\n 128-bit entropy string: ${string}\n`)