-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b46
-
generic
-
generic
Name: bkR10012 Date: 03/04/2004
The description of the constructor
javax.crypto.spec.SecretKeySpec.SecretKeySpec(byte[] key,
int offset,
int len,
String algorithm)
says:
"Constructs a secret key from the given byte array, using the first len
bytes of key, starting at offset inclusive.
The bytes that constitute the secret key are those between key[offset]
and key[offset+len-1] inclusive.
...
Throws:
IllegalArgumentException - if algorithm is null or key is invalid, i.e. null,
empty, or too short."
It is not clear what does "too short" mean.
The spec. should clearly describe the implementation behavior if
- 'offset' or (offset+len-1) are out of range;
- 'len' is less than 1.
======================================================================