-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 5.0
-
Component/s: security-libs
-
b13
-
sparc
-
solaris_2.6
-
Verified
Name: iiR10263 Date: 11/21/2003
javax.crypto.Cipher.init() methods require "opmode" parameter in
order to put the Cipher object into some state. This parameter should
be one of the following values: ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE
or UNWRAP_MODE.
However user may specify other values. Current implementation throws
InvalidParameterException that fits the situation:
"This exception, designed for use by the JCA/JCE engine classes, is
thrown when an invalid parameter is passed to a method."
It is reasonable to include this exception to "throws:" sections of all
javax.crypto.Cipher.init() methods.
======================================================================
javax.crypto.Cipher.init() methods require "opmode" parameter in
order to put the Cipher object into some state. This parameter should
be one of the following values: ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE
or UNWRAP_MODE.
However user may specify other values. Current implementation throws
InvalidParameterException that fits the situation:
"This exception, designed for use by the JCA/JCE engine classes, is
thrown when an invalid parameter is passed to a method."
It is reasonable to include this exception to "throws:" sections of all
javax.crypto.Cipher.init() methods.
======================================================================
- csr for
-
JDK-8292300 (spec) confusing exception list for javax.crypto.Cipher.init(...)
-
- Closed
-