diff --git a/pom.xml b/pom.xml
index d547964..949aadb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
- 25
+ 21
UTF-8
1.8.0
@@ -40,7 +40,7 @@
maven-compiler-plugin
3.13.0
- 25
+ 21
diff --git a/src/main/java/in/dragonbra/javasteam/util/crypto/CryptoHelper.java b/src/main/java/in/dragonbra/javasteam/util/crypto/CryptoHelper.java
index 28864b5..7f8dc8f 100644
--- a/src/main/java/in/dragonbra/javasteam/util/crypto/CryptoHelper.java
+++ b/src/main/java/in/dragonbra/javasteam/util/crypto/CryptoHelper.java
@@ -109,10 +109,10 @@ public static byte[] symmetricDecrypt(byte[] input, byte[] key, Passable
if (key == null) {
throw new IllegalArgumentException("key is null");
}
+ if (key.length != 32) {
+ throw new IllegalArgumentException("SymmetricDecrypt used with non 32 byte key!");
+ }
try {
- if (key.length != 32) {
- logger.debug("SymmetricDecrypt used with non 32 byte key!");
- }
// Step 1: the first 16 bytes are the IV, itself AES/ECB-encrypted with the key.
Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding");
byte[] cryptedIv = Arrays.copyOfRange(input, 0, 16);