There was an error while loading. Please reload this page.
1 parent bb534f1 commit afcfeedCopy full SHA for afcfeed
sha2.lua
@@ -3,7 +3,7 @@
3
--------------------------------------------------------------------------------------------------------------------------
4
-- MODULE: sha2
5
--
6
--- VERSION: 2 (2018-10-07)
+-- VERSION: 2 (2018-10-08)
7
8
-- DESCRIPTION:
9
-- This module contains functions to calculate SHA2 digest:
@@ -229,8 +229,8 @@ elseif branch == "EMUL" then
229
local AND_of_two_bytes = {[0] = 0} -- look-up table (256*256 entries)
230
local idx = 0
231
for y = 0, 127 * 256, 256 do
232
- for x = 0, 127 do
233
- x = AND_of_two_bytes[y + x] * 2
+ for x = y, y + 127 do
+ x = AND_of_two_bytes[x] * 2
234
AND_of_two_bytes[idx] = x
235
AND_of_two_bytes[idx + 1] = x
236
AND_of_two_bytes[idx + 256] = x
0 commit comments