security update round 2

This commit is contained in:
kepler155c@gmail.com
2019-06-29 02:44:30 -04:00
parent d90aa0e2fd
commit 00293033c8
8 changed files with 91 additions and 159 deletions

View File

@@ -115,6 +115,7 @@ local function crypt(data, key, nonce, cntr, round)
cntr = tonumber(cntr) or 1
round = tonumber(round) or 20
local throttle = util.throttle()
local out = {}
local state = initState(key, nonce, cntr)
local blockAmt = math.floor(#data/64)
@@ -131,8 +132,9 @@ local function crypt(data, key, nonce, cntr, round)
end
if i % 1000 == 0 then
os.queueEvent("")
os.pullEvent("")
throttle()
--os.queueEvent("")
--os.pullEvent("")
end
end
return setmetatable(out, mt)