jkeys089 / lua-resty-hmac

HMAC functions for ngx_lua and LuaJIT
160 stars 99 forks source link

Bug when use default algorithm in hmac:new function #14

Closed starsz closed 5 years ago

starsz commented 5 years ago

Hello, when i use hmac:new("xxx"). I found that there was a mistake in your code.

That in your code. hmac.lua:123

 local _hash_algo = hash_algo or hashes.md5

I think it should be

 local _hash_algo = hash_algo or hashes.MD5
jkeys089 commented 5 years ago

@starsz Thank you for the report!