From 26cd5393c9308fabe73c41870f06f73a5b001cd7 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 10 Oct 2009 17:06:52 +0000 Subject: Update m_cloaking to use free-form keys instead of weakening the hash IV git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11820 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_md5.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_md5.cpp') diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp index 00d3fb1e9..9fa4894fd 100644 --- a/src/modules/m_md5.cpp +++ b/src/modules/m_md5.cpp @@ -276,10 +276,10 @@ class ModuleMD5 : public Module { if (strcmp("HASH", request.id) == 0) { - char res[33]; + char res[16]; HashRequest& req = static_cast(request); - GenHash(req.data.data(), res, "0123456789abcdef", NULL, req.data.length()); - req.result = res; + MyMD5(res, (void*)req.data.data(), req.data.length(), NULL); + req.binresult.assign(res, 16); } else if (strcmp("HASH-IV", request.id) == 0) { -- cgit v1.2.3