Function getRandomValues

  • A function which generates random bytes.


    • buffer: Uint8Array

      The Uint8Array to fill with random bytes.


      A cryptographically strong random number generator will be used if available. Otherwise, Math.random will be used as a fallback for randomness.

      The following RNGs are supported, listed in order of precedence:

      • window.crypto.getRandomValues
      • window.msCrypto.getRandomValues
      • `require('crypto').randomFillSync
      • `require('crypto').randomBytes
      • Math.random

    Returns void

Generated using TypeDoc