mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
Ability to choose between sha256 or argon2 with env var close #21
This commit is contained in:
@@ -43,6 +43,9 @@ end
|
||||
|
||||
-- return true if hash passes difficulty
|
||||
function _M.checkdiff(hash, diff)
|
||||
if #hash == 0 then
|
||||
return false
|
||||
end
|
||||
local i = 1
|
||||
for j = 0, (diff-8), 8 do
|
||||
if hash:sub(i, i) ~= "0" then
|
||||
|
Reference in New Issue
Block a user