Skip to content

Commit afcfeed

Browse files
Minor change
1 parent bb534f1 commit afcfeed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sha2.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
--------------------------------------------------------------------------------------------------------------------------
44
-- MODULE: sha2
55
--
6-
-- VERSION: 2 (2018-10-07)
6+
-- VERSION: 2 (2018-10-08)
77
--
88
-- DESCRIPTION:
99
-- This module contains functions to calculate SHA2 digest:
@@ -229,8 +229,8 @@ elseif branch == "EMUL" then
229229
local AND_of_two_bytes = {[0] = 0} -- look-up table (256*256 entries)
230230
local idx = 0
231231
for y = 0, 127 * 256, 256 do
232-
for x = 0, 127 do
233-
x = AND_of_two_bytes[y + x] * 2
232+
for x = y, y + 127 do
233+
x = AND_of_two_bytes[x] * 2
234234
AND_of_two_bytes[idx] = x
235235
AND_of_two_bytes[idx + 1] = x
236236
AND_of_two_bytes[idx + 256] = x

0 commit comments

Comments
 (0)