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

Cipher.getParameters() throws NPE for ChaCha20-Poly1305

    XMLWordPrintable

Details

    Backports

      Description

        The following code throws a NPE:

            Cipher c = Cipher.getInstance("ChaCha20-Poly1305");
            c.getParameters();

        Exception in thread "main" java.lang.NullPointerException: Cannot invoke "[B.clone()" because "buffer" is null
        at java.base/sun.security.util.DerValue.<init>(DerValue.java:283)
        at java.base/com.sun.crypto.provider.ChaCha20Cipher.engineGetParameters(ChaCha20Cipher.java:232)
        at java.base/javax.crypto.Cipher.getParameters(Cipher.java:1060)

        Attachments

          Issue Links

            Activity

              People

                jnimeh Jamil Nimeh
                mullan Sean Mullan
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: