entropy-source/pseudo-random Home Manual Reference Source

src/nextBigUint64.js

  1. export default function nextBigUint64(prng) {
  2. const a = prng.next().value;
  3. const b = prng.next().value;
  4. return BigInt(a) * BigInt(2 ** 32) + BigInt(b);
  5. }