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

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

    Details

    • Subcomponent:
    • Understanding:
      Cause Known
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description

      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.


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

        Attachments

          Activity

            People

            • Assignee:
              wetmore Bradford Wetmore
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: