Class JSSOAEPParameterSpec

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.security.spec.AlgorithmParameterSpec

    public class JSSOAEPParameterSpec
    extends NativeEnclosure
    implements java.security.spec.AlgorithmParameterSpec
    This class is utilized by JSS to implement OAEP support. Unlike the existing OAEPParameterSpec in the JCA, this class supports NativeEnclosure, allowing it to be used within low-level JNI calls. We support copying from an existing OAEPParameterSpec instance (so use is interchangeable within JSS) and support setting members from JSS-specific types. Note that this class cannot be used with other JCA providers natively.
    • Field Detail

      • hashAlg

        public long hashAlg
      • mgf

        public long mgf
      • sourceData

        public byte[] sourceData
    • Constructor Detail

      • JSSOAEPParameterSpec

        public JSSOAEPParameterSpec​(java.lang.String mdName,
                                    java.lang.String mgfName,
                                    java.security.spec.AlgorithmParameterSpec mgfSpec,
                                    javax.crypto.spec.PSource pSrc)
      • JSSOAEPParameterSpec

        public JSSOAEPParameterSpec​(javax.crypto.spec.OAEPParameterSpec copy)
    • Method Detail

      • setDigestAlgorithm

        public void setDigestAlgorithm​(java.lang.String algo)
                                throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • setDigestAlgorithm

        public void setDigestAlgorithm​(DigestAlgorithm algo)
                                throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • setDigestAlgorithm

        public void setDigestAlgorithm​(long algo)
                                throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • setMaskGenAlgorithm

        public void setMaskGenAlgorithm​(java.lang.String algo)
                                 throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • setMaskGenAlgorithmType

        public void setMaskGenAlgorithmType​(java.lang.String algo)
                                     throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • setMaskGenAlgorithmType

        public void setMaskGenAlgorithmType​(java.security.spec.AlgorithmParameterSpec algo)
                                     throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • setMaskGenAlgorithmType

        public void setMaskGenAlgorithmType​(long algo)
                                     throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • setPSource

        public void setPSource​(javax.crypto.spec.PSource spec)
                        throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • setPSource

        public void setPSource​(byte[] data)
                        throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • acquireNativeResources

        protected void acquireNativeResources()
                                       throws java.lang.Exception
        Description copied from class: NativeEnclosure
        Allocate native resources, setting mPointer and mPointerSize as appropriate.
        Specified by:
        acquireNativeResources in class NativeEnclosure
        Throws:
        java.lang.Exception
      • releaseNativeResources

        protected void releaseNativeResources()
                                       throws java.lang.Exception
        Description copied from class: NativeEnclosure
        Called to deallocate native resources; note that mPointer.close() is called afterwards. If mPointer.close() should be a no-op, extend from StaticVoidRef and do any required cleanup here.
        Specified by:
        releaseNativeResources in class NativeEnclosure
        Throws:
        java.lang.Exception