Software /
code /
verse
Comparison
libs/encodings.lua @ 130:5de7f66e4168
libs/encodings.lua: Use mime.b64 for base64.encode
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 13 Sep 2010 14:47:20 +0100 |
parent | 107:59c6f2deb8ab |
child | 391:b496f0262a3f |
comparison
equal
deleted
inserted
replaced
129:c0be31a5ff55 | 130:5de7f66e4168 |
---|---|
1 local function not_impl() | 1 local function not_impl() |
2 error("Encoding function not implemented"); | 2 error("Function not implemented"); |
3 end | 3 end |
4 | |
5 local mime = require "mime"; | |
4 | 6 |
5 module "encodings" | 7 module "encodings" |
6 | 8 |
7 stringprep = {}; | 9 stringprep = {}; |
8 base64 = { encode = not_impl, decode = not_impl }; | 10 base64 = { encode = mime.b64, decode = not_impl }; --mime.unb64 is buggy with \0 |
9 | 11 |
10 return _M; | 12 return _M; |