crypto.getRandomValues
FunctionFills a provided Uint8Array with cryptographically secure random values.
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
getRandomValues(
typedArray):Uint8Array
Fills a provided Uint8Array with cryptographically secure random values. This method emulates crypto.getRandomValues() from the Web Crypto API.
typedArray A Uint8Array to fill with random values.
Returns: Uint8Array The same array passed in after being filled with random values.
Parameters
| Parameter | Type |
|---|---|
typedArray | Uint8Array |
Returns
Uint8Array