openresty / set-misc-nginx-module

Various set_xxx directives added to nginx's rewrite module (md5/sha1, sql/json quoting, and many more)
http://wiki.nginx.org/NginxHttpSetMiscModule
388 stars 102 forks source link

set_hmac_sha256 with NDK #71

Open NicoAdrian opened 1 year ago

NicoAdrian commented 1 year ago

Any plan to add NDK support to the set_hmac_sha256 directive ?

Would be great if I can call it in Lua like this ndk.set_var.set_hmac_sha256

zhuizhuhaomeng commented 1 year ago

I think you can calculate the hmac_sha256 in lua and then set the value by ngx.var.your_var_name = hmac_sha256_val

NicoAdrian commented 1 year ago

I think you can calculate the hmac_sha256 in lua and then set the value by ngx.var.your_var_name = hmac_sha256_val

There is no built-in way in openresty to calculate an hmac_sha256 directly in Lua, or am I missing something ?

zhuizhuhaomeng commented 1 year ago

https://github.com/fffonion/lua-resty-openssl#restyopensslhmac how about this?

NicoAdrian commented 1 year ago

https://github.com/fffonion/lua-resty-openssl#restyopensslhmac how about this?

Will give it a try, thanks. Still, no plan to add NDK support for the directive set_hmac_sha256 ?