Crypto
randomBytes
function randomBytes(length): Uint8Array
Return length
bytes of cryptographically secure random data.
Parameters
Parameter | Type | Description |
---|---|---|
length | number | The number of bytes to generate. |
Returns
Uint8Array
The random bytes.
Example
randomBytes(8);