crypt.random
Generates random bytes.
Syntax
Signature
crypt.random(Count: number) -> stringAliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
Count | number | Number of random bytes. |
Returns
| Type | Description |
|---|---|
string | Raw random bytes. |
Notes
Count must be an integer from zero through 16 MiB.
Example
Luau
local Result = crypt.random(16)
print(Result)