Package javax.crypto.spec
Class OAEPParameterSpec
java.lang.Object
javax.crypto.spec.OAEPParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
public class OAEPParameterSpec extends Object implements AlgorithmParameterSpec
The algorithm parameter specification for the OAEP Padding algorithm.
This padding algorithm is defined in the PKCS #1 standard.
-
Field Summary
Fields Modifier and Type Field Description static OAEPParameterSpecDEFAULTThe algorithm parameter instance with default values. -
Constructor Summary
Constructors Constructor Description OAEPParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, PSource pSrc)Creates a newOAEPParameterSpecinstance with the specified message digest algorithm name, mask generation function (mgf) algorithm name, parameters for the mgf algorithm and the source of the labelL. -
Method Summary
Modifier and Type Method Description StringgetDigestAlgorithm()Returns the algorithm name of the message digest.StringgetMGFAlgorithm()Returns the algorithm name of the mask generation function.AlgorithmParameterSpecgetMGFParameters()Returns the algorithm parameter specification for the mask generation function algorithm.PSourcegetPSource()Returns the source of the labelL.
-
Field Details
-
DEFAULT
The algorithm parameter instance with default values.It uses the following parameters:
- message digest :
"SHA-1" - mask generation function (mgf) :
"MGF1" - parameters for the mgf : "SHA-1"
MGF1ParameterSpec.SHA1 - the source of the label
L:PSource.PSpecified.DEFAULT
- message digest :
-
-
Constructor Details
-
OAEPParameterSpec
public OAEPParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, PSource pSrc)Creates a newOAEPParameterSpecinstance with the specified message digest algorithm name, mask generation function (mgf) algorithm name, parameters for the mgf algorithm and the source of the labelL.- Parameters:
mdName- the message digest algorithm name.mgfName- the mask generation function algorithm name.mgfSpec- the algorithm parameter specification for the mask generation function algorithm.pSrc- the source of the labelL.- Throws:
NullPointerException- if one ofmdName,mgfNameorpSrcis null.
-
-
Method Details
-
getDigestAlgorithm
Returns the algorithm name of the message digest.- Returns:
- the algorithm name of the message digest.
-
getMGFAlgorithm
Returns the algorithm name of the mask generation function.- Returns:
- the algorithm name of the mask generation function.
-
getMGFParameters
Returns the algorithm parameter specification for the mask generation function algorithm.- Returns:
- the algorithm parameter specification for the mask generation function algorithm.
-
getPSource
Returns the source of the labelL.- Returns:
- the source of the label
L.
-