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
All Methods Instance Methods Concrete Methods 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 Detail
-
DEFAULT
public static final OAEPParameterSpec 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 Detail
-
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 Detail
-
getDigestAlgorithm
public String getDigestAlgorithm()
Returns the algorithm name of the message digest.- Returns:
- the algorithm name of the message digest.
-
getMGFAlgorithm
public String getMGFAlgorithm()
Returns the algorithm name of the mask generation function.- Returns:
- the algorithm name of the mask generation function.
-
getMGFParameters
public AlgorithmParameterSpec getMGFParameters()
Returns the algorithm parameter specification for the mask generation function algorithm.- Returns:
- the algorithm parameter specification for the mask generation function algorithm.
-
getPSource
public PSource getPSource()
Returns the source of the labelL.- Returns:
- the source of the label
L.
-
-