Generate a random token of the specified byte length, base64 encoded. Uses crypto.getRandomValues() which is available in browsers and Node.js 19+.
Number of random bytes to generate (default: 16)
Base64-encoded random string
Generate a random token of the specified byte length, base64 encoded. Uses crypto.getRandomValues() which is available in browsers and Node.js 19+.