util.crypto.encode
Shared
Encodes a string into equivalent base64 string
Syntax
local result = util.crypto.encode(
input
)Parameters
| Type | Name | Description |
|---|---|---|
string | input | String containing data to encode |
Returns
| Type | Name | Description |
|---|---|---|
string | bool | result | Encoded string on successful execution, false otherwise |
Examples
local input = "Hello World"
core.engine.print("info", "Input:", input)
core.engine.print("info", "Encoded:", util.crypto.encode(input))