Changeset

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
parents 129:c0be31a5ff55
children 131:1c30dd51ca6b
files libs/encodings.lua
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libs/encodings.lua	Mon Sep 13 14:46:36 2010 +0100
+++ b/libs/encodings.lua	Mon Sep 13 14:47:20 2010 +0100
@@ -1,10 +1,12 @@
 local function not_impl()
-	error("Encoding function not implemented");
+	error("Function not implemented");
 end
 
+local mime = require "mime";
+
 module "encodings"
 
 stringprep = {};
-base64 = { encode = not_impl, decode = not_impl };
+base64 = { encode = mime.b64, decode = not_impl }; --mime.unb64 is buggy with \0
 
 return _M;