public class RSASSAPkcs1v15Parameters extends PKCS1AlgorithmParameters
Only may be used for raw RSA PKCS#1v1.5 signatures to specify the hash algorithm used by the signature engine.
Constructor and Description |
---|
RSASSAPkcs1v15Parameters()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(ASN1Object asn1Params)
Initializes this RSASSAPkcs1v15Parameters object from the given ASN1Object.
|
protected byte[] |
engineGetEncoded()
Returns the parameters as DER byte array.
|
protected byte[] |
engineGetEncoded(java.lang.String format)
Returns the parameters as a DER byte array.
|
protected java.security.spec.AlgorithmParameterSpec |
engineGetParameterSpec(java.lang.Class paramSpec)
Returns the RSASSAPkcs1v15 parameters as transparent parameter
specification of the given class type.
|
protected void |
engineInit(java.security.spec.AlgorithmParameterSpec paramSpec)
Initializes this RSASSAPkcs1v15Parameters from the given
RSASSAPkcs1v15ParameterSpec.
|
protected void |
engineInit(byte[] params)
Initializes this RSASSAPkcs1v15Parameters object from the given DER encoded
byte array.
|
protected void |
engineInit(byte[] params,
java.lang.String format)
Inits the parameters from an DER encoded byte array.
|
protected java.lang.String |
engineToString()
Returns a String representation of this object.
|
ASN1Object |
toASN1Object()
Gets an ASN.1 representation of this RSA-SSA PKCS1v1.5 parameters.
|
public RSASSAPkcs1v15Parameters()
RSASSAPkcs1v15Parameters
object. Applications shall use one of
the AlgorithmParameters.getInstance
factory methods for
obtaining RSASSAPkcs1v15Parameters.protected byte[] engineGetEncoded() throws java.io.IOException
engineGetEncoded
in class java.security.AlgorithmParametersSpi
java.io.IOException
- if an encoding error occursprotected byte[] engineGetEncoded(java.lang.String format) throws java.io.IOException
Format is ignored. Only DER encoding is supported at this time. This method
only calls engineGetEncoded()
, regardless of what
is specified in the format
string.
engineGetEncoded
in class java.security.AlgorithmParametersSpi
format
- the encoding format; ignoredjava.io.IOException
- if an encoding error occurspublic ASN1Object toASN1Object()
protected java.security.spec.AlgorithmParameterSpec engineGetParameterSpec(java.lang.Class paramSpec) throws java.security.spec.InvalidParameterSpecException
engineGetParameterSpec
in class java.security.AlgorithmParametersSpi
paramSpec
- the desired parameter specification class
(RSASSAPkcs1v15ParameterSpec)java.security.spec.InvalidParameterSpecException
- if the parameters cannot be converted to the desired parameter
specificationprotected void engineInit(java.security.spec.AlgorithmParameterSpec paramSpec) throws java.security.spec.InvalidParameterSpecException
engineInit
in class PKCS1AlgorithmParameters
paramSpec
- the parameter specification, which has to be a
RSASSAPkcs1v15ParameterSpecjava.security.spec.InvalidParameterSpecException
- if the given parameter specification is not a or is an invalid
RSASSAPkcs1v15ParameterSpecprotected void engineInit(byte[] params) throws java.io.IOException
engineInit
in class PKCS1AlgorithmParameters
params
- the DER encoded byte arrayjava.io.IOException
- if an error occurs when decoding the given byte arraypublic void decode(ASN1Object asn1Params) throws CodingException
asn1Params
- the RSA-SSA PKCS1v1.5 parameters in ASN.1 representationCodingException
- if an error occurs when parsing the parametersprotected void engineInit(byte[] params, java.lang.String format) throws java.io.IOException
engineInit(params)
for initializing this
RSASSAPkcs1v15Parameters object from the given DER encoded byte array,
regardless of what is specified in the format
string.
engineInit
in class java.security.AlgorithmParametersSpi
params
- the DER encoded byte arrayformat
- the encoding format; ignoredjava.io.IOException
- if an error occurs when decoding the given byte arrayprotected java.lang.String engineToString()
engineToString
in class java.security.AlgorithmParametersSpi