Android APIs
public class

PSSParameterSpec

extends Object
implements AlgorithmParameterSpec
java.lang.Object
   ↳ java.security.spec.PSSParameterSpec

Class Overview

The parameter specification for the RSA-PSS Signature scheme.

Defined in the PKCS #1 v2.1 standard.

Summary

Fields
public static final PSSParameterSpec DEFAULT The default parameter specification.
Public Constructors
PSSParameterSpec(int saltLen)
Creates a new PSSParameterSpec with the specified salt length and the default values.
PSSParameterSpec(String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, int saltLen, int trailerField)
Creates a new PSSParameterSpec with the specified message digest name, mask generation function name, mask generation function parameters, salt length, and trailer field value.
Public Methods
String getDigestAlgorithm()
Returns the name of the message digest algorithm.
String getMGFAlgorithm()
Returns the name of the mask generation function algorithm.
AlgorithmParameterSpec getMGFParameters()
Returns the parameter for the mask generation function algorithm.
int getSaltLength()
Returns the length of the salt (in bits).
int getTrailerField()
Returns the trailer field value.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final PSSParameterSpec DEFAULT

Added in API level 1

The default parameter specification. It specifies the following parameters:

  • message digest: "SHA-1"
  • mask generation function (mgf): "MGF1"
  • parameters for the mgf: SHA1
  • salt length: 20
  • trailer field: -1

Public Constructors

public PSSParameterSpec (int saltLen)

Added in API level 1

Creates a new PSSParameterSpec with the specified salt length and the default values.

Parameters
saltLen the salt length (in bits).
Throws
IllegalArgumentException if saltLen is negative.

public PSSParameterSpec (String mdName, String mgfName, AlgorithmParameterSpec mgfSpec, int saltLen, int trailerField)

Added in API level 1

Creates a new PSSParameterSpec with the specified message digest name, mask generation function name, mask generation function parameters, salt length, and trailer field value.

Parameters
mdName the name of the message digest algorithm.
mgfName the name of the mask generation function algorithm.
mgfSpec the parameter for the mask generation function algorithm.
saltLen the salt length (in bits).
trailerField the trailer field value.
Throws
IllegalArgumentException if saltLen or trailerField is negative.

Public Methods

public String getDigestAlgorithm ()

Added in API level 1

Returns the name of the message digest algorithm.

Returns
  • the name of the message digest algorithm.

public String getMGFAlgorithm ()

Added in API level 1

Returns the name of the mask generation function algorithm.

Returns
  • the name of the mask generation function algorithm.

public AlgorithmParameterSpec getMGFParameters ()

Added in API level 1

Returns the parameter for the mask generation function algorithm.

Returns
  • the parameter for the mask generation function algorithm, or null if none specified.

public int getSaltLength ()

Added in API level 1

Returns the length of the salt (in bits).

Returns
  • the length of the salt (in bits).

public int getTrailerField ()

Added in API level 1

Returns the trailer field value.

Returns
  • the trailer field value.