Remove some debugging code that slipped in
[prosody.git] / util-src / hashes.c
index aa550426f6832b00886c8262424cddfe805fa7ae..ec045c1d86b9fd51ca87fb7f8c4248823692599c 100644 (file)
@@ -1,3 +1,23 @@
+/* Prosody IM v0.1
+-- Copyright (C) 2008 Matthew Wild
+-- Copyright (C) 2008 Waqas Hussain
+-- 
+-- This program is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU General Public License
+-- as published by the Free Software Foundation; either version 2
+-- of the License, or (at your option) any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*/
+
+
 /*\r
 * hashes.c\r
 * Lua library for sha1, sha256 and md5 hashes\r
@@ -26,7 +46,7 @@ static int myFunc(lua_State *L) { \
        int hex_out = lua_toboolean(L, 2); \\r
        char hash[size]; \\r
        char result[size*2]; \\r
-       func(s, len, hash); \\r
+       func((const unsigned char*)s, len, (unsigned char*)hash);  \\r
        if (hex_out) { \\r
                toHex(hash, size, result); \\r
                lua_pushlstring(L, result, size*2); \\r
@@ -48,7 +68,7 @@ static const luaL_Reg Reg[] =
        { NULL,         NULL    }\r
 };\r
 \r
-LUALIB_API int luaopen_hashes(lua_State *L)\r
+LUALIB_API int luaopen_util_hashes(lua_State *L)\r
 {\r
        luaL_register(L, "hashes", Reg);\r
        lua_pushliteral(L, "version");                  /** version */\r