base64 encode/decode module.
luarocks install base64mix
local base64mix = require('base64mix')
local src = 'hello world'
local enc, err = base64mix.encode(src)
print(enc) -- 'aGVsbG8gd29ybGQ='
this function encodes a string into a URL-safe base64 format string.
local base64mix = require('base64mix')
local src = 'aGVsbG8gd29ybGQ='
local dec, err = base64mix.decode(src)
print(dec) -- 'hello world'
this function decodes a string in URL-safe base64 format.
this function decodes both standard and URL-safe base64 format.