getRandomValues

Web Crypto-compatible getRandomValues: fills the provided typed array with cryptographically secure random bytes and returns it

import { getRandomValues } from "@roku-sdk/runtime/crypto";
getRandomValues<T extends ArrayBufferView>(array: T): T

Description

Web Crypto-compatible getRandomValues: fills the provided typed array with cryptographically secure random bytes and returns it.

Parameters

NameTypeDescription
arrayTA typed array to fill in place.

Return values

The same array reference, filled with random bytes.


What’s Next

Did this page help you?