9951 explained code solutions for 126 technologies


nginx-luaCalculating sha1


server {
  location / {
    content_by_lua_block {
      local sign = ngx.sha1_bin('Hi all')
    }
  }
}ctrl + c
ngx.sha1_bin

returns sha1 for specified string

'Hi all'

string to calculate sha1 for

sign

this variable will store generated sha1

content_by_lua_block

nginx-lua module directive to specify block of Lua code