Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 379 Bytes

base64.md

File metadata and controls

17 lines (10 loc) · 379 Bytes
tagline
base64 encoding & decoding

local b64 = require'base64'

Fast base64 encoding & decoding in Lua with ffi.

API

b64.[encode|decode](s[, size], [outbuf], [outbuf_size]) -> s | outbuf, len

Encode/decode string or cdata buffer.

b64.urlencode|decode -> s

Encode/decode URL based on RFC4648 Section 5 / RFC7515 Section 2 (JSON Web Signature).