可以使用ngx.hmac_sha1,简单明了
在 2018年4月8日星期日 UTC+8下午6:01:23,Xiangxuan Qu写道:
大家好!
我在
kong 中编写自定义插件的时候,需要调用 hmac:new 方法,但是一直返回 nil, 而且 err 也是 nil
请问各位遇到过类似情况吗,能指点一下不
我的环境是 docker kong:0.12.3-centos
相关代码
local hm, err = hmac:new(conf.session_secret)
if hm == nil then
ngx.log(ngx.ERR, 'hmac failed secret:', conf.session_secret, "err:", err)
return
end
希望大家能予以相助,不胜感激