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

Unspecified behavior in IvParameterSpec constructors

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b44
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: bkR10012 Date: 03/02/2004


      The description of the constructor
      javax.crypto.spec.IvParameterSpec.IvParameterSpec(byte[] iv,
                                                        int offset,
                                                        int len)
      says:
      "The bytes that constitute the IV are those between iv[offset] and
      iv[offset+len-1] inclusive.
      ...
      Throws:
      IllegalArgumentException - if iv is null or (iv.length - offset < len)"

      But the spec. does not describe constructor behavior if (offset + len <= 0).

      Also, the spec. describes the different behavior for
      IvParameterSpec(byte[] iv) and IvParameterSpec(byte[] iv,int offset,int len)
      if iv is null:
      NullPointerException for IvParameterSpec(byte[] iv)
      and IllegalArgumentException for IvParameterSpec(byte[] iv,int offset,int len).

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

        Attachments

          Activity

            People

            Assignee:
            valeriep Valerie Peng
            Reporter:
            kuzsunw Kuz Kuz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: