-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 5.0
-
Component/s: security-libs
-
b44
-
generic
-
generic
Name: bkR10012 Date: 03/02/2004
The description of the constructor
javax.crypto.spec.IvParameterSpec.IvParameterSpec(byte[] iv,
int offset,
int len)
says:
"The bytes that constitute the IV are those between iv[offset] and
iv[offset+len-1] inclusive.
...
Throws:
IllegalArgumentException - if iv is null or (iv.length - offset < len)"
But the spec. does not describe constructor behavior if (offset + len <= 0).
Also, the spec. describes the different behavior for
IvParameterSpec(byte[] iv) and IvParameterSpec(byte[] iv,int offset,int len)
if iv is null:
NullPointerException for IvParameterSpec(byte[] iv)
and IllegalArgumentException for IvParameterSpec(byte[] iv,int offset,int len).
======================================================================