From 2db068eabc0067244f1add78b4e829014df20d26 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 4 Feb 2013 06:48:48 +0100 Subject: the java program (does not hash as python, but I think python also got som bug sneaked in) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- SHA3.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'SHA3.java') diff --git a/SHA3.java b/SHA3.java index 3064d8a..d1a1b0f 100644 --- a/SHA3.java +++ b/SHA3.java @@ -417,7 +417,7 @@ public class SHA3 * @param c The capacity * @param n The output size */ - private static void initalise(int r, int c, int n) + public static void initalise(int r, int c, int n) { SHA3.r = r; SHA3.c = c; @@ -438,7 +438,7 @@ public class SHA3 * * @param msg The partial message */ - private static void update(byte[] msg) + public static void update(byte[] msg) { update(msg, msg.length); } @@ -450,7 +450,7 @@ public class SHA3 * @param msg The partial message * @param msglen The length of the partial message */ - private static void update(byte[] msg, int msglen) + public static void update(byte[] msg, int msglen) { int rr = SHA3.r >> 3; int ww = SHA3.w >> 3; @@ -509,7 +509,7 @@ public class SHA3 /** * Squeeze the Keccak sponge */ - private static byte[] digest() + public static byte[] digest() { return digest(null); } @@ -520,9 +520,9 @@ public class SHA3 * * @param msg The rest of the message */ - private static byte[] digest(byte[] msg) + public static byte[] digest(byte[] msg) { - return digest(msg, msg.length); + return digest(msg, msg == null ? 0 : msg.length); } @@ -532,7 +532,7 @@ public class SHA3 * @param msg The rest of the message * @param msglen The length of the partial message */ - private static byte[] digest(byte[] msg, int msglen) + public static byte[] digest(byte[] msg, int msglen) { byte[] message; if ((msg == null) || (msglen == 0)) -- cgit v1.2.3-70-g09d2