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

PBEWithMD5AndDES cipher throws wrong exception for invalid algorithm parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • security-libs
    • None
    • beta
    • generic
    • generic

      When using the PBEWithMD5AndDES cipher impl from SunJCE provider,
      if the wrong parameters (e.g. IvParameterSpec rather then PBEParameterSpec)
      is specified, ClassCastException is thrown.

      According to the javadoc spec of javax.crypto.Cipher.init(...) method,
      InvalidAlgorithmParameterException should be thrown instead of
      ClassCastException.

      The test program is attached.
      ###@###.### 2004-12-16 19:20:57 GMT

            valeriep Valerie Peng
            valeriep Valerie Peng
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: