Fix BLAKE3 output expansion
This commit is contained in:
parent
c9829f9759
commit
0cd726952a
|
@ -118,8 +118,8 @@ local function merge(cvl, cvr)
|
||||||
return cvl
|
return cvl
|
||||||
end
|
end
|
||||||
|
|
||||||
local function expand(out, len, offset)
|
local function expand(state, len, offset)
|
||||||
expect(1, out, "table")
|
expect(1, state, "table")
|
||||||
expect(1, len, "number")
|
expect(1, len, "number")
|
||||||
expect(2, offset, "nil", "number")
|
expect(2, offset, "nil", "number")
|
||||||
offset = offset or 0
|
offset = offset or 0
|
||||||
|
@ -128,7 +128,7 @@ local function expand(out, len, offset)
|
||||||
local out = {}
|
local out = {}
|
||||||
for i = 0, len / 64 do
|
for i = 0, len / 64 do
|
||||||
local n = offset + i
|
local n = offset + i
|
||||||
local md = compress(out.cv, out.m, n, out.n, out.f, true)
|
local md = compress(state.cv, state.m, n, state.n, state.f, true)
|
||||||
out[i + 1] = ("<I4I4I4I4I4I4I4I4I4I4I4I4I4I4I4I4"):pack(unpack(md))
|
out[i + 1] = ("<I4I4I4I4I4I4I4I4I4I4I4I4I4I4I4I4"):pack(unpack(md))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue