ReferenceEncoding and crypto

base64encode

Encodes arbitrary bytes as Base64 text.

Syntax

base64encode(data: string) -> string

Also available as

base64.encodebase64_encodecrypt.base64.encodecrypt.base64_encodecrypt.base64encode

Parameters

ParameterTypeDescription
datastringRaw bytes.

Returns

TypeDescription
stringBase64 text.

Description

Base64 is a reversible encoding, not encryption. The result is suitable for text-only fields. Use base64decode to recover the original binary data.

Example

local encoded = base64encode("hello")
print(encoded)
print(base64decode(encoded))

These are Game executor contracts. Check build requirements and session lifetimes before using them.