Generate a random symmetric key with crypt.generatekey
crypt-generate-keyGenerate a cryptographically random symmetric key as a Base64 string for use with crypt-encrypt and crypt-decrypt operations.
Instructions
Generate a cryptographically random symmetric key using the executor's crypt.generatekey(). The key is returned as a Base64 string suitable for use with crypt-encrypt / crypt-decrypt. This is a pure, side-effect-free compute that runs entirely in-game. Requires crypt.generatekey; on an executor without it, it returns { error } instead of throwing. The call is pcall-guarded. Returns { key } or { error }. Signature: { threadContext: number?, timeoutMs: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client. Produces: structured-result. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeoutMs | No | Optional per-call deadline in milliseconds; omit it to use the tool or server default. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |