Skip to content

mah0x211/lua-base64mix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lua-base64mix

test codecov

base64 encode/decode module.


Installation

luarocks install base64mix

str, err = base64mix.encode( src:string )

local base64mix = require('base64mix')
local src = 'hello world'
local enc, err = base64mix.encode(src)
print(enc) -- 'aGVsbG8gd29ybGQ='

str, err = base64mix.encodeURL( src:string )

this function encodes a string into a URL-safe base64 format string.

str, err = base64mix.decode( src:string )

local base64mix = require('base64mix')
local src = 'aGVsbG8gd29ybGQ='
local dec, err = base64mix.decode(src)
print(dec) -- 'hello world'

str, err = base64mix.decodeURL( src:string )

this function decodes a string in URL-safe base64 format.

str, err = base64mix.decodeMix( src:string )

this function decodes both standard and URL-safe base64 format.

About

base64 encode/decode module

Resources

Stars

Watchers

Forks

Packages

No packages published