Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4958071

(spec) confusing exception list for javax.crypto.Cipher.init(...) for

XMLWordPrintable

    • 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.


      ======================================================================

            kdriver Kevin Driver
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: