Syntax
base64_encode(data: string): stringAliases
base64encodebase64.encodecrypt.base64.encodecrypt.base64_encodecrypt.base64encodeArguments
| Name | Type | Description |
|---|---|---|
data | string | The string to be base64 encoded. |
Returns
| Name | Type | Description |
|---|---|---|
encoded | string | The base64 encoded string. |
Description
Encodes a string into Base64.
Call it with 1 parameter(s): data. The argument table explains which values are required and which ones only refine the behavior.
It returns encoded (string). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Encode text and decode it back to the original value.
local encoded = base64_encode("hello world")
local decoded = base64_decode(encoded)
print(encoded)
print(decoded)