diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-05-03 20:06:03 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-05-03 20:06:03 +0200 |
commit | 25fdad62e84a4d1c61a52d5b96dc5325982a30de (patch) | |
tree | c1df8b5f928bc3618be90949ff1c732e0b2c4830 /java-c-jni | |
parent | apply change made to pure-java to other versions (diff) | |
download | sha3sum-25fdad62e84a4d1c61a52d5b96dc5325982a30de.tar.gz sha3sum-25fdad62e84a4d1c61a52d5b96dc5325982a30de.tar.bz2 sha3sum-25fdad62e84a4d1c61a52d5b96dc5325982a30de.tar.xz |
fix partial byte output
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | java-c-jni/SHA3.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/java-c-jni/SHA3.c b/java-c-jni/SHA3.c index 9124743..827458a 100644 --- a/java-c-jni/SHA3.c +++ b/java-c-jni/SHA3.c @@ -680,6 +680,9 @@ byte* digest(byte* msg, jint msglen) if (olen > 0) keccakF(S); } + if ((n & 7)) + rc[n >> 3] &= (1 << (n & 7)) - 1; + return rc; } |