-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
sparc
-
solaris_7
Name: mtR10145 Date: 11/28/2003
Constructor RC5ParameterSpec(int,int,int,byte[]) throws
unexpected IAE like test code below illustrates. This exception is
unspecified since the spec states only "Throws: IllegalArgumentException - if iv is null."
=================== Test20.java ======================
import javax.crypto.spec.*;
public class Test20 {
public static void main(String args[]) {
String testString = new String("testStringToBeConvertedIntoBytes");
RC5ParameterSpec rs = null;
try {
rs = new RC5ParameterSpec(1, 1, 32, testString.substring(0, 6).getBytes());
System.out.println("No exceptions thrown");
} catch(IllegalArgumentException ex) {
System.out.println("IAE: " + ex);
}
}
}
============== Test output with J2SE 1.5.0-beta-b29 ====
IAE: java.lang.IllegalArgumentException: IV too short
======================================================================
Name: mtR10145 Date: 12/01/2003
Constructor RC5ParameterSpec(int, int, int, byte[],int)
is affected by this bug too. To reproduce simply use the following string:
rs = new RC5ParameterSpec(1, 1, 32, testString.substring(0, 6).getBytes(), 0);
in test code below instead of existent one.
======================================================================
- duplicates
-
JDK-4960803 RC5ParameterSpec: behavior of invalid argument is not defined
-
- Closed
-