diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-02-08 06:31:13 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-02-08 06:31:13 +0100 |
commit | 7ad82d0366a352055316c0e2de22dc9abdd292a4 (patch) | |
tree | 5c5b967487e8d9a157b5c29feee898cf302472ff /pure-java/SHA3.java | |
parent | m (diff) | |
download | sha3sum-7ad82d0366a352055316c0e2de22dc9abdd292a4.tar.gz sha3sum-7ad82d0366a352055316c0e2de22dc9abdd292a4.tar.bz2 sha3sum-7ad82d0366a352055316c0e2de22dc9abdd292a4.tar.xz |
corrected
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, 1 insertions, 3 deletions
diff --git a/pure-java/SHA3.java b/pure-java/SHA3.java index 2e0f774..76d3df4 100644 --- a/pure-java/SHA3.java +++ b/pure-java/SHA3.java @@ -318,7 +318,7 @@ public class SHA3 */ private static byte[] pad10star1(byte[] msg, int len, int r) { - int nrf = len >> 3; + int nrf = (len <<= 3) >> 3; int nbrf = len & 7; int ll = len % r; @@ -336,8 +336,6 @@ public class SHA3 len = ((len - (len % r) + (r - 8)) >> 3) + 1; message = new byte[len]; message[nrf] = b; - //for (long i = nrf + 1; i < len; i++) - // message[i + nrf] = 0; message[len - 1] = -128; } System.arraycopy(msg, 0, message, 0, nrf); |