Implements

Constructors

Accessors

Methods

Constructors

  • Parameters

    • _entropySource: RandomSource = defaultRandomSource
    • _hash: (new () => Hash) = SHA256
    • _personalization: Uint8Array = ...
    • _reseedInterval: number = RESEED_INTERVAL

    Returns HMACDRBG

Accessors

  • get isAvailable(): boolean
  • Returns the availability of random source. A source can only be used if isAvailable returns true.

    Returns boolean

Methods

  • Returns a byte array of the given length filled with random bytes.

    Parameters

    • length: number

    Returns Uint8Array