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; }