interface RandomSource {
    isAvailable: boolean;
    randomBytes(length: number): Uint8Array;
}

Implemented by

    Properties

    Methods

    Properties

    isAvailable: boolean

    Returns the availability of random source. A source can only be used if isAvailable returns true.

    Methods

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

      Parameters

      • length: number

      Returns Uint8Array