aboutsummaryrefslogtreecommitdiffstats
path: root/java/SHA3.java
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-11 22:54:48 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-11 22:54:48 +0100
commitd0262422cc014d64b480197fd3961dd528ba6feb (patch)
treecd1eaabe880d189102cb9689fa21ebed77a140b5 /java/SHA3.java
parentfix bug in the c versions for smaller state sizes (diff)
downloadsha3sum-d0262422cc014d64b480197fd3961dd528ba6feb.tar.gz
sha3sum-d0262422cc014d64b480197fd3961dd528ba6feb.tar.bz2
sha3sum-d0262422cc014d64b480197fd3961dd528ba6feb.tar.xz
fix bug
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'java/SHA3.java')
-rw-r--r--java/SHA3.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/SHA3.java b/java/SHA3.java
index fa70915..9f41a00 100644
--- a/java/SHA3.java
+++ b/java/SHA3.java
@@ -838,7 +838,7 @@ public class SHA3
int olen = SHA3.n;
int j = 0;
- int ni = Math.min(25, rr);
+ int ni = rr / ww;
while (olen > 0)
{
int i = 0;
@@ -937,7 +937,7 @@ public class SHA3
int olen = SHA3.n;
int j = 0, ptr = 0;
- int ni = Math.min(25, SHA3.r >> 3);
+ int ni = (SHA3.r >> 3) / ww;
while (olen > 0)
{
int i = 0;