Package com.itextpdf.signatures
Class RSASSAPSSMechanismParams
java.lang.Object
com.itextpdf.signatures.RSASSAPSSMechanismParams
- All Implemented Interfaces:
-
IApplicableSignatureParams,ISignatureMechanismParams
Encode the signer's parameters for producing an RSASSA-PSS signature. Note that this class is intended for use in the signing process only, so it does not need to be able to represent all possible parameter configurations; only the ones we consider reasonable. For the purposes of this class, the mask generation function is always MGF1, and the associated digest function is the same as the digest function used in the signing process.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault value of the trailer field parameter. -
Constructor Summary
ConstructorsConstructorDescriptionRSASSAPSSMechanismParams(IASN1ObjectIdentifier digestAlgoOid, int saltLen, int trailerField) Instantiate RSASSA-PSS parameters with MGF1 for a given digest algorithm OID, salt length and trailer field value. -
Method Summary
Modifier and TypeMethodDescriptionvoidApply the parameters to aSignature.static RSASSAPSSMechanismParamscreateForDigestAlgorithm(String digestAlgorithmName) Instantiate RSASSA-PSS parameters with MGF1 for the given algorithm name.Represent the parameters as anIASN1Encodablefor inclusion in a signature object.
-
Field Details
-
DEFAULT_TRAILER_FIELD
public static final int DEFAULT_TRAILER_FIELDDefault value of the trailer field parameter.- See Also:
-
-
Constructor Details
-
RSASSAPSSMechanismParams
public RSASSAPSSMechanismParams(IASN1ObjectIdentifier digestAlgoOid, int saltLen, int trailerField) Instantiate RSASSA-PSS parameters with MGF1 for a given digest algorithm OID, salt length and trailer field value.- Parameters:
-
digestAlgoOid- the digest algorithm OID that will be used for both the digest and MGF -
saltLen- the salt length -
trailerField- the trailer field
-
-
Method Details
-
createForDigestAlgorithm
Instantiate RSASSA-PSS parameters with MGF1 for the given algorithm name.- Parameters:
-
digestAlgorithmName- the name of the digest algorithm - Returns:
- RSASSA-PSS parameters with MGF1 for the given algorithm name.
-
toEncodable
Represent the parameters as anIASN1Encodablefor inclusion in a signature object.- Specified by:
-
toEncodablein interfaceISignatureMechanismParams - Returns:
-
an
IASN1Encodableobject
-
apply
Apply the parameters to aSignature.- Specified by:
-
applyin interfaceIApplicableSignatureParams - Parameters:
-
signature- an uninitialisedSignatureobject
-