From 1ff3867733292ff7cc5533781199c777596c8b5d Mon Sep 17 00:00:00 2001 From: Marcos Kirsch Date: Sun, 8 Feb 2015 22:05:08 -0600 Subject: [PATCH] Base64 decoding function is operational --- b64.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/b64.lua b/b64.lua index 4444fc1..33cdab0 100755 --- a/b64.lua +++ b/b64.lua @@ -3,6 +3,9 @@ -- compatible with lua 5.1 -- http://www.it-rfc.de -- licensed under the terms of the LGPL2 +--module('b64', package.seeall) + +b64 = {} -- bitshift functions (<<, >> equivalent) -- shift left @@ -42,7 +45,7 @@ end -- function decode -- decode base64 input to string -function decode(data) +function b64.decode(data) local chars = {} local result="" for dpos=0,string.len(data)-1,4 do @@ -60,4 +63,4 @@ function decode(data) return result end -module('b64',package.seeall) +return b64