From 5b92d425de693affbafb6f984da3ed0c23297435 Mon Sep 17 00:00:00 2001 From: Evan Saulpaugh Date: Tue, 15 Mar 2022 08:13:14 -0500 Subject: [PATCH] remove commented checks --- src/main/java/com/joemelsha/crypto/hash/Keccak.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/com/joemelsha/crypto/hash/Keccak.java b/src/main/java/com/joemelsha/crypto/hash/Keccak.java index 2a0baac68..215423092 100644 --- a/src/main/java/com/joemelsha/crypto/hash/Keccak.java +++ b/src/main/java/com/joemelsha/crypto/hash/Keccak.java @@ -41,14 +41,8 @@ public final class Keccak extends MessageDigest { public Keccak(int digestSizeBits) { super(getAlgName(digestSizeBits)); - int rateSizeBits = rateSizeBitsFor(digestSizeBits); -// if (rateSizeBits + digestSizeBits * 2 != MAX_STATE_SIZE) -// throw new IllegalArgumentException("Invalid rateSizeBits + digestSizeBits * 2: " + rateSizeBits + " + " + digestSizeBits + " * 2 != " + MAX_STATE_SIZE); -// if (rateSizeBits <= 0 || (rateSizeBits & 0x3f) != 0) -// throw new IllegalArgumentException("Invalid rateSizeBits: " + rateSizeBits); this.digestSizeBytes = digestSizeBits >>> 3; - - this.rateSizeBits = rateSizeBits; + this.rateSizeBits = rateSizeBitsFor(digestSizeBits); this.rateSizeWords = rateSizeBits >>> 6; }