Lua
Lua
Decode Base64
Demonstrates how to decode base64.Chilkat Lua Downloads
local chilkat = require("chilkat")
local bd = chilkat.BinData.new()
-- Append a base64 string to bd.
local success = bd:append_encoded("c2VjcmV0", "base64")
-- The bd now contains the decoded bytes.
-- Let's say it was a password string..
local password = bd:get_string("utf-8")
-- Decodes to "secret".
print("password = " .. password)