From 7ad82d0366a352055316c0e2de22dc9abdd292a4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 8 Feb 2013 06:31:13 +0100 Subject: corrected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- pure-java/SHA3.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pure-java/SHA3.java') 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); -- cgit v1.2.3-70-g09d2