From 7b783076e554a82b4970b09e7f93c17956c26adc Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Thu, 16 Apr 2015 10:41:23 +0800 Subject: [PATCH] use hmac_hash --- lualib/snax/msgserver.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib/snax/msgserver.lua b/lualib/snax/msgserver.lua index f6804a60..a70ea415 100644 --- a/lualib/snax/msgserver.lua +++ b/lualib/snax/msgserver.lua @@ -178,7 +178,7 @@ function server.start(conf) end local text = string.format("%s:%s", username, index) - local v = crypt.hmac64(crypt.hashkey(text), u.secret) + local v = crypt.hmac_hash(u.secret, text) -- equivalent to crypt.hmac64(crypt.hashkey(text), u.secret) if v ~= hmac then return "401 Unauthorized" end