plugins/mod_saslauth.lua
changeset 449 c0a4a1e63d70
parent 447 c0dae734d3bf
child 519 cccd610a0ef9
--- a/plugins/mod_saslauth.lua	Fri Nov 28 01:13:34 2008 +0500
+++ b/plugins/mod_saslauth.lua	Fri Nov 28 01:16:26 2008 +0500
@@ -8,6 +8,7 @@
 local t_concat, t_insert = table.concat, table.insert;
 local tostring = tostring;
 local jid_split = require "util.jid".split
+local md5 = require "util.hashes".md5;
 
 local log = require "util.logger".init("mod_saslauth");
 
@@ -50,7 +51,7 @@
 		if mechanism == "PLAIN" then
 			return func, password;
 		elseif mechanism == "DIGEST-MD5" then
-			return func, require "md5".sum(node..":"..host..":"..password);
+			return func, md5(node..":"..host..":"..password);
 		end
 	end
 	return func, nil;