Generates cryptographically secure random bytes.
The number of random bytes to generate.
A byte array containing random bytes.
Error if length is not a positive integer.
const randomBytes = getRandomBytes(16) // 16 random bytes Copy
const randomBytes = getRandomBytes(16) // 16 random bytes
Generates cryptographically secure random bytes.