wangyp0701 commented on issue #3334:
URL: https://github.com/apache/apisix/issues/3334#issuecomment-1898182140

   This is the lua script I used
   
   ```lua
   access_by_lua_block {
           local hmac = require("resty.hmac")
           local secret = 'admin1'
           local message = [[
   GET
   /get
   age=36&name=james
   admin2
   Thu, 18 Jan 2024 06:51:16 GMT
   User-Agent:curl/7.29.0
   ]]
           local digest = hmac:new(secret, hmac.ALGOS.SHA256):final(message)
   
           --to lowercase hexits
           --ngx.say(digest)
   
           --to base64
           ngx.say(ngx.encode_base64(digest))
         } 
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to