Top Description Fields Constructors Methods
sun.security.rsa

public final Class PSSParameters

extends AlgorithmParametersSpi
Class Inheritance
Imports
java.io.*, sun.security.util.*, sun.security.x509.*, java.security.AlgorithmParametersSpi, .NoSuchAlgorithmException, java.security.spec.AlgorithmParameterSpec, .InvalidParameterSpecException, .MGF1ParameterSpec, .PSSParameterSpec

This class implements the PSS parameters used with the RSA signatures in PSS padding. Here is its ASN.1 definition: RSASSA-PSS-params ::= SEQUENCE { hashAlgorithm [0] HashAlgorithm DEFAULT sha1, maskGenAlgorithm [1] MaskGenAlgorithm DEFAULT mgf1SHA1, saltLength [2] INTEGER DEFAULT 20 trailerField [3] TrailerField DEFAULT trailerFieldBC }
Author
Valerie Peng

Field Summary

Modifier and TypeField and Description
private PSSParameterSpec

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected byte[]
engineGetEncoded()

Implements abstract java.security.AlgorithmParametersSpi.engineGetEncoded.

Returns the parameters in their primary encoding format.
protected byte[]
engineGetEncoded(String
the name of the encoding format.
encMethod
)

Implements abstract java.security.AlgorithmParametersSpi.engineGetEncoded.

Returns the parameters encoded in the specified format.
protected <T extends AlgorithmParameterSpec> T
engineGetParameterSpec(Class<T>
the specification class in which the parameters should be returned.
paramSpec
)

Implements abstract java.security.AlgorithmParametersSpi.engineGetParameterSpec.

Returns a (transparent) specification of this parameters object.
protected void
engineInit(AlgorithmParameterSpec
the parameter specification.
paramSpec
)

Implements abstract java.security.AlgorithmParametersSpi.engineInit.

Initializes this parameters object using the parameters specified in paramSpec.
protected void
engineInit(byte[]
the encoded parameters.
encoded
)

Implements abstract java.security.AlgorithmParametersSpi.engineInit.

Imports the specified parameters and decodes them according to the primary decoding format for parameters.
protected void
engineInit(byte[]
the encoded parameters.
encoded
,
String
the name of the decoding format.
decodingMethod
)

Implements abstract java.security.AlgorithmParametersSpi.engineInit.

Imports the parameters from params and decodes them according to the specified decoding format.
protected String
engineToString()

Implements abstract java.security.AlgorithmParametersSpi.engineToString.

Returns a formatted string describing the parameters.
public static byte[]

Returns:

its DER encoding
getEncoded
(PSSParameterSpec
a PSSParameterSpec object
spec
)

Returns the encoding of a PSSParameterSpec object.

Field Detail

specback to summary
private PSSParameterSpec spec

Constructor Detail

PSSParametersback to summary
public PSSParameters()

Method Detail

engineGetEncodedback to summary
protected byte[] engineGetEncoded() throws IOException

Implements abstract java.security.AlgorithmParametersSpi.engineGetEncoded.

Doc from java.security.AlgorithmParametersSpi.engineGetEncoded.

Returns the parameters in their primary encoding format. The primary encoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.

Returns:byte[]

the parameters encoded using their primary encoding format.

Annotations
@Override
Exceptions
IOException:
on encoding errors.
engineGetEncodedback to summary
protected byte[] engineGetEncoded(String encMethod) throws IOException

Implements abstract java.security.AlgorithmParametersSpi.engineGetEncoded.

Doc from java.security.AlgorithmParametersSpi.engineGetEncoded.

Returns the parameters encoded in the specified format. If format is null, the primary encoding format for parameters is used. The primary encoding format is ASN.1, if an ASN.1 specification for these parameters exists.

Parameters
encMethod:String

the name of the encoding format.

Returns:byte[]

the parameters encoded using the specified encoding scheme.

Annotations
@Override
Exceptions
IOException:
on encoding errors.
engineGetParameterSpecback to summary
protected <T extends AlgorithmParameterSpec> T engineGetParameterSpec(Class<T> paramSpec) throws InvalidParameterSpecException

Implements abstract java.security.AlgorithmParametersSpi.engineGetParameterSpec.

Doc from java.security.AlgorithmParametersSpi.engineGetParameterSpec.

Returns a (transparent) specification of this parameters object. paramSpec identifies the specification class in which the parameters should be returned. It could, for example, be DSAParameterSpec.class, to indicate that the parameters should be returned in an instance of the DSAParameterSpec class.

Parameters
<T>
the type of the parameter specification to be returned
paramSpec:Class<T>

the specification class in which the parameters should be returned.

Returns:T

the parameter specification.

Annotations
@Override
Exceptions
InvalidParameterSpecException:
if the requested parameter specification is inappropriate for this parameter object.
engineInitback to summary
protected void engineInit(AlgorithmParameterSpec paramSpec) throws InvalidParameterSpecException

Implements abstract java.security.AlgorithmParametersSpi.engineInit.

Doc from java.security.AlgorithmParametersSpi.engineInit.

Initializes this parameters object using the parameters specified in paramSpec.

Parameters
paramSpec:AlgorithmParameterSpec

the parameter specification.

Annotations
@Override
Exceptions
InvalidParameterSpecException:
if the given parameter specification is inappropriate for the initialization of this parameter object.
engineInitback to summary
protected void engineInit(byte[] encoded) throws IOException

Implements abstract java.security.AlgorithmParametersSpi.engineInit.

Doc from java.security.AlgorithmParametersSpi.engineInit.

Imports the specified parameters and decodes them according to the primary decoding format for parameters. The primary decoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.

Parameters
encoded:byte[]

the encoded parameters.

Annotations
@Override
Exceptions
IOException:
on decoding errors
engineInitback to summary
protected void engineInit(byte[] encoded, String decodingMethod) throws IOException

Implements abstract java.security.AlgorithmParametersSpi.engineInit.

Doc from java.security.AlgorithmParametersSpi.engineInit.

Imports the parameters from params and decodes them according to the specified decoding format. If format is null, the primary decoding format for parameters is used. The primary decoding format is ASN.1, if an ASN.1 specification for these parameters exists.

Parameters
encoded:byte[]

the encoded parameters.

decodingMethod:String

the name of the decoding format.

Annotations
@Override
Exceptions
IOException:
on decoding errors
engineToStringback to summary
protected String engineToString()

Implements abstract java.security.AlgorithmParametersSpi.engineToString.

Doc from java.security.AlgorithmParametersSpi.engineToString.

Returns a formatted string describing the parameters.

Returns:String

a formatted string describing the parameters.

Annotations
@Override
getEncodedback to summary
public static byte[] getEncoded(PSSParameterSpec spec) throws IOException

Returns the encoding of a PSSParameterSpec object. This method is used in this class and AlgorithmId.

Parameters
spec:PSSParameterSpec

a PSSParameterSpec object

Returns:byte[]

its DER encoding

Exceptions
IOException:
if the name of a MessageDigest or MaskGenAlgorithm is unsupported