From bf790985d8fff8389f278131b128eb65777d2c3a Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 11 Jun 2007 21:24:48 +0000 Subject: Fixing LUA MD5 code. --- lib/LuaHttp.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/LuaHttp.cc b/lib/LuaHttp.cc index 9d40d7e..d3cbd2a 100644 --- a/lib/LuaHttp.cc +++ b/lib/LuaHttp.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: LuaHttp.cc,v 1.14 2007-06-11 11:27:21 pixel Exp $ */ +/* $Id: LuaHttp.cc,v 1.15 2007-06-11 21:24:48 pixel Exp $ */ #include "md5.h" #include "Domain.h" @@ -256,10 +256,9 @@ int sLua_HttpResponse::HttpResponse_proceed_statics(Lua * L, int n, int caller) md5_starts(&ctx); md5_update(&ctx, (uint8 *) dec_t, dec.strlen()); md5_finish(&ctx, md5sum); - md5sum[16] = 0; for (i = 0; i < 16; i++) { - md5sum_r = md5sum_r + hconv[md5sum[i] % 16]; md5sum_r = md5sum_r + hconv[md5sum[i] >> 4]; + md5sum_r = md5sum_r + hconv[md5sum[i] % 16]; } L->push(md5sum_r); r = 1; -- cgit v1.2.3