crypt.generatebytes
Generates random bytes and encodes them in Base64.
The returned string is Base64, so its length differs from the raw byte count. Uses the operating system random generator.
crypt.generatebytes(length: number?): stringParameters
| Parameter | Type | Description |
|---|---|---|
length | number? | Raw byte count; defaults to 16. Valid range is 1–65,536. |
Errors: Zero, negative or greater-than-65,536 byte counts raise an error.
