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 int
Default value of the trailer field parameter.private final IASN1ObjectIdentifier
private static final IBouncyCastleFactory
private final int
private final int
-
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 TypeMethodDescriptionvoid
Apply the parameters to aSignature
.static RSASSAPSSMechanismParams
createForDigestAlgorithm
(String digestAlgorithmName) Instantiate RSASSA-PSS parameters with MGF1 for the given algorithm name.Represent the parameters as anIASN1Encodable
for 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:
-
FACTORY
-
digestAlgoOid
-
saltLen
private final int saltLen -
trailerField
private final int trailerField
-
-
Constructor Details
-
RSASSAPSSMechanismParams
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 MGFsaltLen
- the salt lengthtrailerField
- 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 anIASN1Encodable
for inclusion in a signature object.- Specified by:
toEncodable
in interfaceISignatureMechanismParams
- Returns:
- an
IASN1Encodable
object
-
apply
Apply the parameters to aSignature
.- Specified by:
apply
in interfaceIApplicableSignatureParams
- Parameters:
signature
- an uninitialisedSignature
object
-