Package org.mozilla.jss.crypto
Class JSSOAEPParameterSpec
java.lang.Object
org.mozilla.jss.util.NativeEnclosure
org.mozilla.jss.crypto.JSSOAEPParameterSpec
- All Implemented Interfaces:
AutoCloseable
,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 Summary
FieldsFields inherited from class org.mozilla.jss.util.NativeEnclosure
mPointer, mPointerSize
-
Constructor Summary
ConstructorsConstructorDescriptionJSSOAEPParameterSpec
(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, PSource pSrc) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Allocate native resources, setting mPointer and mPointerSize as appropriate.protected void
Called to deallocate native resources; note that mPointer.close() is called afterwards.void
setDigestAlgorithm
(long algo) void
setDigestAlgorithm
(String algo) void
void
setMaskGenAlgorithm
(String algo) void
setMaskGenAlgorithmType
(long algo) void
void
void
setPSource
(byte[] data) void
setPSource
(PSource spec) Methods inherited from class org.mozilla.jss.util.NativeEnclosure
close, finalize, open
-
Field Details
-
hashAlg
public long hashAlg -
mgf
public long mgf -
sourceData
public byte[] sourceData
-
-
Constructor Details
-
JSSOAEPParameterSpec
public JSSOAEPParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, PSource pSrc) -
JSSOAEPParameterSpec
-
-
Method Details
-
setDigestAlgorithm
- Throws:
IllegalArgumentException
-
setDigestAlgorithm
- Throws:
IllegalArgumentException
-
setDigestAlgorithm
- Throws:
IllegalArgumentException
-
setMaskGenAlgorithm
- Throws:
IllegalArgumentException
-
setMaskGenAlgorithmType
- Throws:
IllegalArgumentException
-
setMaskGenAlgorithmType
- Throws:
IllegalArgumentException
-
setMaskGenAlgorithmType
- Throws:
IllegalArgumentException
-
setPSource
- Throws:
IllegalArgumentException
-
setPSource
- Throws:
IllegalArgumentException
-
acquireNativeResources
Description copied from class:NativeEnclosure
Allocate native resources, setting mPointer and mPointerSize as appropriate.- Specified by:
acquireNativeResources
in classNativeEnclosure
- Throws:
Exception
-
releaseNativeResources
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 classNativeEnclosure
- Throws:
Exception
-