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

Cipher.getInstance() are underspecified

    Details

    • Subcomponent:
    • Resolved In Build:
      b46
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.6
    • Verification:
      Verified

      Description



      Name: vmR10215 Date: 03/15/2004


      The description of the method
      public static final Cipher getInstance(String transformation)
              throws NoSuchAlgorithmException,
              NoSuchPaddingException
      says:
      "Generates a Cipher object that implements the specified transformation.
      ...
           Parameters:
               transformation - the name of the transformation, e.g., DES/CBC/PKCS5Padding.
               See Appendix A in the Java Cryptography Extension Reference Guide for information about
               standard transformation names.
      ...
           Throws:
               NoSuchAlgorithmException - if the specified transformation is not available in the
               default provider package or any of the other provider packages that were searched.
               NoSuchPaddingException - if transformation contains a padding scheme that is not available."

      It is not clear from the spec. how the metod must behave if transformation
       - is null or
       - empty or
       - of wrong format (e.g. "aaa/bbb/ccc/ddd/fff", "///", ...)

      The same issue is applied to all Cipher.getInstance methods.

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                valeriep Valerie Peng
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: