to top
Android APIs
public class

OAEPParameterSpec

extends Object
implements AlgorithmParameterSpec
java.lang.Object
   ↳ javax.crypto.spec.OAEPParameterSpec

Class Overview

The algorithm parameter specification for the OAEP Padding algorithm.

This padding algorithm is defined in the PKCS #1 standard.

Summary

Fields
public static final OAEPParameterSpec DEFAULT The algorithm parameter instance with default values.
Public Constructors
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.
Public Methods
String getDigestAlgorithm()
Returns the algorithm name of the message digest.
String getMGFAlgorithm()
Returns the algorithm name of the mask generation function.
AlgorithmParameterSpec getMGFParameters()
Returns the algorithm parameter specification for the mask generation function algorithm.
PSource getPSource()
Returns the source of the label L.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final OAEPParameterSpec DEFAULT

Added in API level 1

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" SHA1
  • the source of the label L: DEFAULT

Public Constructors

public OAEPParameterSpec (String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, PSource pSrc)

Added in API level 1

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.

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 label L.
Throws
NullPointerException if one of mdName, mgfName or pSrc is null.

Public Methods

public String getDigestAlgorithm ()

Added in API level 1

Returns the algorithm name of the message digest.

Returns
  • the algorithm name of the message digest.

public String getMGFAlgorithm ()

Added in API level 1

Returns the algorithm name of the mask generation function.

Returns
  • the algorithm name of the mask generation function.

public AlgorithmParameterSpec getMGFParameters ()

Added in API level 1

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

Returns
  • the algorithm parameter specification for the mask generation function algorithm.

public PSource getPSource ()

Added in API level 1

Returns the source of the label L.

Returns
  • the source of the label L.