Function generateRandomBytesUnchecked

  • Generate a Uint8Array of the specified length containing a cryptographically-random series of bytes. See generateRandomBytes for a safer alternative.

    Parameters

    • length: number

      the length of the Uint8Array to generate

    • cryptoInstance: {
          getRandomValues: (<T>(array) => T);
      } = crypto

      an instance of the Crypto object with the getRandomValues function (defaults to the crypto global property).

      • getRandomValues: (<T>(array) => T)
          • <T>(array): T
          • Type Parameters

            • T extends null | ArrayBufferView

            Parameters

            • array: T

            Returns T

    Returns Uint8Array

Generated using TypeDoc