cryptoRandom
constcryptoRandom:CryptoEngine
Defined in: src/engine/crypto.ts:71
The platform CSPRNG, wrapped as an engine.
crypto.getRandomValues in browsers, workers and edge runtimes;
node:crypto on Node. Unpredictable, and for that reason not seedable —
which is what backs ransu/secure and the identifier functions.
Example
Section titled “Example”cryptoRandom.nextUint32(); // unpredictablecryptoRandom.seedable; // false
new Random(cryptoRandom).pick(["a", "b", "c"]);