FileDocCategorySizeDatePackage
OAEPParameterSpec.javaAPI DocAndroid 1.5 API4406Wed May 06 22:41:02 BST 2009javax.crypto.spec

OAEPParameterSpec

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.

since
Android 1.0

Fields Summary
private final String
mdName
private final String
mgfName
private final AlgorithmParameterSpec
mgfSpec
private final PSource
pSrc
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" {@link MGF1ParameterSpec#SHA1}
  • the source of the label L: {@link PSource.PSpecified#DEFAULT}
Constructors Summary
private OAEPParameterSpec()


      
        this.mdName = "SHA-1"; //$NON-NLS-1$
        this.mgfName = "MGF1"; //$NON-NLS-1$
        this.mgfSpec = MGF1ParameterSpec.SHA1;
        this.pSrc = PSource.PSpecified.DEFAULT;
    
public OAEPParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, PSource pSrc)
Creates a new OAEPParameterSpec instance with the specified message digest algorithm name, mask generation function (mgf) algorithm name, parameters for the mgf algorithm and the source of the label L.

param
mdName the message digest algorithm name.
param
mgfName the mask generation function algorithm name.
param
mgfSpec the algorithm parameter specification for the mask generation function algorithm.
param
pSrc the source of the label L.
throws
NullPointerException if one of mdName, mgfName or pSrc is null.

        if ((mdName == null) || (mgfName == null) || (pSrc == null)) {
            throw new NullPointerException();
        }
        this.mdName = mdName;
        this.mgfName = mgfName;
        this.mgfSpec = mgfSpec;
        this.pSrc = pSrc;
    
Methods Summary
public java.lang.StringgetDigestAlgorithm()
Returns the algorithm name of the message digest.

return
the algorithm name of the message digest.

        return mdName;
    
public java.lang.StringgetMGFAlgorithm()
Returns the algorithm name of the mask generation function.

return
the algorithm name of the mask generation function.

        return mgfName;
    
public java.security.spec.AlgorithmParameterSpecgetMGFParameters()
Returns the algorithm parameter specification for the mask generation function algorithm.

return
the algorithm parameter specification for the mask generation function algorithm.

        return mgfSpec;
    
public javax.crypto.spec.PSourcegetPSource()
Returns the source of the label L.

return
the source of the label L.

        return pSrc;