diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-02-08 08:10:23 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-02-08 08:10:23 +0100 |
commit | edd3e950fed9d7cc766428e45d52c7a34ce682ca (patch) | |
tree | 02095013d9bde2e4b3b01f4f3264c5c9970a1c28 /pure-java/SHA3.java | |
parent | corrected (diff) | |
download | sha3sum-edd3e950fed9d7cc766428e45d52c7a34ce682ca.tar.gz sha3sum-edd3e950fed9d7cc766428e45d52c7a34ce682ca.tar.bz2 sha3sum-edd3e950fed9d7cc766428e45d52c7a34ce682ca.tar.xz |
optimise c version
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'pure-java/SHA3.java')
-rw-r--r-- | pure-java/SHA3.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pure-java/SHA3.java b/pure-java/SHA3.java index 76d3df4..0568b1f 100644 --- a/pure-java/SHA3.java +++ b/pure-java/SHA3.java @@ -138,7 +138,7 @@ public class SHA3 */ private static long rotate64(long x, int n) { - return (x >>> (SHA3.w - n)) + (x << n); + return (x >>> (64 - n)) + (x << n); } @@ -259,7 +259,7 @@ public class SHA3 private static void keccakF(long[] A) { if (SHA3.nr == 24) - for (int i = 0; i < SHA3.nr; i++) + for (int i = 0; i < 24; i++) SHA3.keccakFRound(A, SHA3.RC[i]); else for (int i = 0; i < SHA3.nr; i++) |