aboutsummaryrefslogtreecommitdiffstats
path: root/python2/sha3sum.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-08-21 18:22:25 +0200
committerMattias Andrée <maandree@operamail.com>2014-08-21 18:22:25 +0200
commit0a9fd0ca7575e96c7eac5a80dacedd074e568226 (patch)
tree3a55ed6d93a94d458eeb022381476d84b4df0680 /python2/sha3sum.py
parentfix memory leak (diff)
downloadsha3sum-0a9fd0ca7575e96c7eac5a80dacedd074e568226.tar.gz
sha3sum-0a9fd0ca7575e96c7eac5a80dacedd074e568226.tar.bz2
sha3sum-0a9fd0ca7575e96c7eac5a80dacedd074e568226.tar.xz
beginning on support for partial bytes, c implemention is not working correctly
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rwxr-xr-xpython2/sha3sum.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python2/sha3sum.py b/python2/sha3sum.py
index f3131d8..17b083c 100755
--- a/python2/sha3sum.py
+++ b/python2/sha3sum.py
@@ -317,7 +317,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
b = (b & 15) + (0 if b <= '9' else 0)
chunk[_] = a | b
sha.update(chunk, n)
- bs = sha.digest(j == 1)
+ bs = sha.digest(withReturn = j == 1)
if j > 2:
sha.fastSqueeze(j - 2)
if j > 1:
@@ -329,7 +329,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
if multi == 0:
for _ in range(i - 1):
sha.initialise(r, c, o)
- bs = sha.digest(bs, j == 1)
+ bs = sha.digest(bs, withReturn = j == 1)
if j > 2:
sha.fastSqueeze(j - 2)
if j > 1:
@@ -390,7 +390,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
printerr('\033[01;31mLoop found\033[00m')
flush()
except Exception as err:
- printerr(cmd + ': connot read file: ' + fn + ': ' + str(err))
+ printerr(cmd + ': cannot read file: ' + fn + ': ' + str(err))
fail = True
flush()
if fail: