aboutsummaryrefslogtreecommitdiffstats
path: root/python2/sha3.py
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 /python2/sha3.py
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 'python2/sha3.py')
-rw-r--r--python2/sha3.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python2/sha3.py b/python2/sha3.py
index a71f750..ecc3bc8 100644
--- a/python2/sha3.py
+++ b/python2/sha3.py
@@ -579,7 +579,7 @@ class SHA3:
olen = self.n
j = 0
- ni = min(25, rr)
+ ni = rr // ww
while olen > 0:
i = 0
while (i < ni) and (j < nn):
@@ -644,7 +644,7 @@ class SHA3:
olen = self.n
j = 0
ptr = 0
- ni = min(25, self.r >> 3)
+ ni = (self.r >> 3) // ww
while olen > 0:
i = 0