Closed C4o closed 3 years ago
@C4o using an empty key should work fine. E.g.
ngx.say(hmac:new("", hmac.ALGOS.SHA256):final("hello, world!", true))
-- output: "2f0dc4b94797ef8e149c247a6eb13df7a8f4aaf8eea19dfb548f7f80d25cef0c"
@C4o in your example you've computed the sha-256 hash. This lib computes HMAC. The comparable Go code would look like https://play.golang.org/p/mmzDteED9CL.
sorry...
I set the KEY to "", but the result is not right...How can i do..