if (opMode == ENCRYPT_MODE)
{
if (inLength > maxPlainTextSize)
{
throw new IllegalBlockSizeException(
"The length of the plaintext (" + inLength
+ " bytes) is not supported by "
+ "the cipher (max. " + maxPlainTextSize
+ " bytes).");
}
}
else if (opMode == DECRYPT_MODE)
{
if (inLength != cipherTextSize)
{
throw new IllegalBlockSizeException(
"Illegal ciphertext length (expected " + cipherTextSize
+ " bytes, was " + inLength + " bytes).");
}
}