aboutsummaryrefslogtreecommitdiffstats
path: root/pure-java/SHA3.java
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-02-07 20:33:54 +0100
committerMattias Andrée <maandree@operamail.com>2013-02-07 20:33:54 +0100
commitaaa48e1bbe053199dc49fcb5bbd565b08d5453ef (patch)
tree80fac097e21cfbc0e6c77326becb6b2acbf290ea /pure-java/SHA3.java
parenterror in java version detected (c is identical) + c implemention other wise complete but not optimised (and misses blksize reading) (diff)
downloadsha3sum-aaa48e1bbe053199dc49fcb5bbd565b08d5453ef.tar.gz
sha3sum-aaa48e1bbe053199dc49fcb5bbd565b08d5453ef.tar.bz2
sha3sum-aaa48e1bbe053199dc49fcb5bbd565b08d5453ef.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'pure-java/SHA3.java')
-rw-r--r--pure-java/SHA3.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/pure-java/SHA3.java b/pure-java/SHA3.java
index 700e469..2e0f774 100644
--- a/pure-java/SHA3.java
+++ b/pure-java/SHA3.java
@@ -362,7 +362,7 @@ public class SHA3
SHA3.w = SHA3.b / 25;
SHA3.l = SHA3.lb(SHA3.w);
SHA3.nr = 12 + (SHA3.l << 1);
- SHA3.wmod = (1L << SHA3.w) - 1L;
+ SHA3.wmod = w == 64 ? -1L : (1L << SHA3.w) - 1L;
SHA3.S = new long[25];
SHA3.M = new byte[(SHA3.r * SHA3.b) >> 2];
SHA3.mptr = 0;