Ability to choose between sha256 or argon2 with env var close #21

This commit is contained in:
Thomas Lynch
2023-02-11 23:38:59 +11:00
parent 2089d790a2
commit f231b86544
7 changed files with 76 additions and 49 deletions

View File

@@ -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