Migrate cipher to ChaCha20
This commit is contained in:
@@ -10,6 +10,15 @@ local _sformat = string.format
|
||||
local _srep = string.rep
|
||||
local _ssub = string.sub
|
||||
|
||||
function Util.hexToByteArray(str)
|
||||
local r = {}
|
||||
str = tostring(str)
|
||||
for b in str:gmatch("%x%x?") do
|
||||
r[#r+1] = tonumber(b, 16)
|
||||
end
|
||||
return r
|
||||
end
|
||||
|
||||
function Util.tryTimed(timeout, f, ...)
|
||||
local c = os.clock()
|
||||
repeat
|
||||
|
||||
Reference in New Issue
Block a user