Lua
Lua
Example: Crypt2.DecodeString method
Demonstrates how to call the DecodeString method.Chilkat Lua Downloads
local chilkat = require("chilkat")
local crypt2 = chilkat.Crypt2.new()
-- The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="
local encodedStr = "SGVsbG8gV29ybGQ="
local encoding = "base64"
local charset = "utf-8"
local str = crypt2:decode_string(encodedStr, charset, encoding)
print(str)
-- Output is "Hello World"