Summary
Encodes binary data using the base64 algorithm.
Syntax
local encodedString = base64Encode(string)Parameters
String : binary data to encode.
Returns
String : encoded string.
Description
Converts binary data to its equivalent string representation in base64 format.
Note that strings in Lua contain 8-bit characters.
Examples
local b64Encoded = base64Encode("This parameter should be encoded:\r\n")
print(b64Encoded)
VGhpcyBwYXJhbWV0ZXIgc2hvdWxkIGJlIGVuY29kZWQ6DQo=
See Also