changed wildly confusing argument name bitLength to bitStrength.
extends KeccakDigest
implements Xof
{
- private static int checkBitLength(int bitLength)
+ private static int checkBitLength(int bitStrength)
{
- switch (bitLength)
+ switch (bitStrength)
{
case 128:
case 256:
- return bitLength;
+ return bitStrength;
default:
- throw new IllegalArgumentException("'bitLength' " + bitLength + " not supported for SHAKE");
+ throw new IllegalArgumentException("'bitStrength' " + bitStrength + " not supported for SHAKE");
}
}
@@ -39,16 +39,22 @@ public SHAKEDigest(CryptoServicePurpose purpose)
/**
* Base constructor.
*
- * @param bitLength the security strength in bits of the XOF.
+ * @param bitStrength the security strength in bits of the XOF.
*/
- public SHAKEDigest(int bitLength)
+ public SHAKEDigest(int bitStrength)
{
- super(checkBitLength(bitLength), CryptoServicePurpose.ANY);
+ super(checkBitLength(bitStrength), CryptoServicePurpose.ANY);
}
- public SHAKEDigest(int bitLength, CryptoServicePurpose purpose)
+ /**
+ * Base constructor.
+ *
+ * @param bitStrength the security strength in bits of the XOF.
+ * @param purpose the purpose of the digest will be used for.
+ */
+ public SHAKEDigest(int bitStrength, CryptoServicePurpose purpose)
{
- super(checkBitLength(bitLength), purpose);
+ super(checkBitLength(bitStrength), purpose);
}
/**
