-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
7
-
None
-
generic
-
generic
java spec defines following behavior of the javax.crypto.spec.SecretKeySpec constructor:
--- SecretKeySpec(byte[] key,int offset,int,len,String algorithm)
"...
Throws:
IllegalArgumentException - if algorithm is null or key is null, empty, or too short, i.e. key.length-offset.
ArrayIndexOutOfBoundsException - is thrown if offset or len index bytes outside the key."
However the runtime throws "java.lang.IllegalArgumentException: Invalid offset/length combination" when len/offset are invalid.
--- SecretKeySpec(byte[] key,int offset,int,len,String algorithm)
"...
Throws:
IllegalArgumentException - if algorithm is null or key is null, empty, or too short, i.e. key.length-offset.
ArrayIndexOutOfBoundsException - is thrown if offset or len index bytes outside the key."
However the runtime throws "java.lang.IllegalArgumentException: Invalid offset/length combination" when len/offset are invalid.