From 4e0ea4634f06bfc7389a435b56366f71894a8d9f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 3 May 2013 02:57:34 +0200 Subject: apply change made to pure-java to other versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- c/sha3.c | 2 +- java-c-jni/SHA3.c | 2 +- python3/sha3sum.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/c/sha3.c b/c/sha3.c index 72f3e83..a5e8f69 100644 --- a/c/sha3.c +++ b/c/sha3.c @@ -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 -- cgit v1.2.3-70-g09d2