aboutsummaryrefslogtreecommitdiffstats
path: root/java-c-jni/SHA3.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-04 07:38:00 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-04 07:38:10 +0100
commitfc38bb90abd9785e686e5e986ffe916753961f1c (patch)
treea8d03d8494a775d66ee9711b1a1253865bbf0877 /java-c-jni/SHA3.c
parentderp (diff)
downloadsha3sum-fc38bb90abd9785e686e5e986ffe916753961f1c.tar.gz
sha3sum-fc38bb90abd9785e686e5e986ffe916753961f1c.tar.bz2
sha3sum-fc38bb90abd9785e686e5e986ffe916753961f1c.tar.xz
whoops, error in non-python version when hashing with a wordsize below 64 bits
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'java-c-jni/SHA3.c')
-rw-r--r--java-c-jni/SHA3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/java-c-jni/SHA3.c b/java-c-jni/SHA3.c
index 9422b3c..73b161d 100644
--- a/java-c-jni/SHA3.c
+++ b/java-c-jni/SHA3.c
@@ -602,7 +602,7 @@ void update(byte* msg, long msglen)
else
for (i = 0; i < nnn; i += rr)
{
- #define __S(Si, OFF) S[Si] ^= toLane(message, len, rr, ww, OFF * w)
+ #define __S(Si, OFF) S[Si] ^= toLane(message, len, rr, ww, OFF * ww)
__S( 0, 0); __S( 5, 1); __S(10, 2); __S(15, 3); __S(20, 4);
__S( 1, 5); __S( 6, 6); __S(11, 7); __S(16, 8); __S(21, 9);
__S( 2, 10); __S( 7, 11); __S(12, 12); __S(17, 13); __S(22, 14);
@@ -699,7 +699,7 @@ byte* digest(byte* msg, long msglen, long bits, int* suffix, long suffix_len, bo
else
for (i = 0; i < nnn; i += rr)
{
- #define __S(Si, OFF) S[Si] ^= toLane(message, len, rr, ww, OFF * w)
+ #define __S(Si, OFF) S[Si] ^= toLane(message, len, rr, ww, OFF * ww)
__S( 0, 0); __S( 5, 1); __S(10, 2); __S(15, 3); __S(20, 4);
__S( 1, 5); __S( 6, 6); __S(11, 7); __S(16, 8); __S(21, 9);
__S( 2, 10); __S( 7, 11); __S(12, 12); __S(17, 13); __S(22, 14);