Syntax
base64_decode(data: string): stringAliases
base64decodebase64.decodecrypt.base64.decodecrypt.base64_decodecrypt.base64decodeArguments
| Name | Type | Description |
|---|---|---|
data | string | Base64 input passed to Base64 decoder. |
Returns
| Name | Type | Description |
|---|---|---|
decoded | string | Decoded bytes returned as a Lua string with explicit length. |
Description
Decodes Base64 input with Base64 decoder and returns the decoded bytes as a Lua string.
Call it with 1 parameter(s): data. The argument table explains which values are required and which ones only refine the behavior.
It returns decoded (string). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Decode Base64 data and read the returned Lua string.
local encoded = base64_encode("hello world")
local decoded = base64_decode(encoded)
print(decoded)
print(base64decode(encoded))
print(base64.decode(encoded))