diff options
-rw-r--r-- | c/sha3.c | 2 | ||||
-rw-r--r-- | java-c-jni/SHA3.c | 2 | ||||
-rwxr-xr-x | python3/sha3sum.py | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -619,7 +619,7 @@ extern byte* digest(byte* msg, long msglen) byte* message; byte* rc; long rr = r >> 3, len; - long nn = n >> 3, olen; + long nn = (n + 7) >> 3, olen; long ww = w >> 3, ni; long i, j = 0, ptr = 0, _; diff --git a/java-c-jni/SHA3.c b/java-c-jni/SHA3.c index ad01ebc..9124743 100644 --- a/java-c-jni/SHA3.c +++ b/java-c-jni/SHA3.c @@ -608,7 +608,7 @@ byte* digest(byte* msg, jint msglen) byte* message; byte* rc; long rr = r >> 3, len; - long nn = n >> 3, olen; + long nn = (n + 7) >> 3, olen; long ww = w >> 3, ni; long i, j = 0, ptr = 0, _; diff --git a/python3/sha3sum.py b/python3/sha3sum.py index 38f9670..43bdf2f 100755 --- a/python3/sha3sum.py +++ b/python3/sha3sum.py @@ -465,7 +465,7 @@ class SHA3: ptr = 0 rr = SHA3.r >> 3 - nn = SHA3.n >> 3 + nn = (SHA3.n + 3) >> 3 ww = SHA3.w >> 3 # Absorbing phase |