在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):iskolbin/lbase64开源软件地址(OpenSource Url):https://github.com/iskolbin/lbase64开源编程语言(OpenSource Language):Lua 100.0%开源软件介绍(OpenSource Introduction):Lua base64 encoder/decoderPure Lua base64 encoder/decoder. Works with Lua 5.1+ and LuaJIT. Fallbacks to pure Lua bit operations if bit/bit32/native bit operators are not available. local base64 = require'base64'
local str = 'Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.'
local b64str = 'TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4='
local encoded = base64.encode( str )
local decoded = base64.decode( b64str )
assert( str == decoded )
assert( b64str == encoded ) base64.encode( str, encoder = DEFAULT, usecache = false )Encodes base64.decode( str, decoder = DEFAULT, usecache = false )Decodes base64.makeencoder( s62 = '+', s63 = '/', spad = '=' )Make custom encoding table base64.makedecoder( s62 = '+', s63 = '/', spad = '=' )Make custom decoding table Installluarocks install base64 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论