fixed changed exception
@@ -455,7 +455,7 @@ private void testRepeatedGCMWithSpec(byte[] K,
eax.init(Cipher.ENCRYPT_MODE, new RepeatedSecretKeySpec("AES"), spec);
fail("no exception");
}
- catch (InvalidKeyException e)
+ catch (InvalidAlgorithmParameterException e)
{
isTrue("wrong message", "cannot reuse nonce for GCM encryption".equals(e.getMessage()));
}
@@ -465,7 +465,7 @@ private void testRepeatedGCMWithSpec(byte[] K,
eax.init(Cipher.ENCRYPT_MODE, new RepeatedSecretKeySpec("AES"), new IvParameterSpec(spec.getIV()));
fail("no exception");
}
- catch (InvalidKeyException e)
+ catch (InvalidAlgorithmParameterException e)
{
isTrue("wrong message", "cannot reuse nonce for GCM encryption".equals(e.getMessage()));
}
@@ -475,7 +475,7 @@ private void testRepeatedGCMWithSpec(byte[] K,
eax.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(K, "AES"), new IvParameterSpec(spec.getIV()));
fail("no exception");
}
- catch (InvalidKeyException e)
+ catch (InvalidAlgorithmParameterException e)
{
isTrue("wrong message", "cannot reuse nonce for GCM encryption".equals(e.getMessage()));
}
