Package com.itextpdf.signatures
Class RSASSAPSSMechanismParams
- java.lang.Object
-
- com.itextpdf.signatures.RSASSAPSSMechanismParams
-
- All Implemented Interfaces:
IApplicableSignatureParams
,ISignatureMechanismParams
public class RSASSAPSSMechanismParams extends java.lang.Object implements IApplicableSignatureParams
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
Fields Modifier and Type Field Description static int
DEFAULT_TRAILER_FIELD
Default value of the trailer field parameter.private IASN1ObjectIdentifier
digestAlgoOid
private static IBouncyCastleFactory
FACTORY
private int
saltLen
private int
trailerField
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(java.security.Signature signature)
Apply the parameters to aSignature
.static RSASSAPSSMechanismParams
createForDigestAlgorithm(java.lang.String digestAlgorithmName)
Instantiate RSASSA-PSS parameters with MGF1 for the given algorithm name.IASN1Encodable
toEncodable()
Represent the parameters as anIASN1Encodable
for inclusion in a signature object.
-
-
-
Field Detail
-
DEFAULT_TRAILER_FIELD
public static final int DEFAULT_TRAILER_FIELD
Default value of the trailer field parameter.- See Also:
- Constant Field Values
-
FACTORY
private static final IBouncyCastleFactory FACTORY
-
digestAlgoOid
private final IASN1ObjectIdentifier digestAlgoOid
-
saltLen
private final int saltLen
-
trailerField
private final int trailerField
-
-
Constructor Detail
-
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 MGFsaltLen
- the salt lengthtrailerField
- the trailer field
-
-
Method Detail
-
createForDigestAlgorithm
public static RSASSAPSSMechanismParams createForDigestAlgorithm(java.lang.String digestAlgorithmName)
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
public IASN1Encodable toEncodable()
Represent the parameters as anIASN1Encodable
for inclusion in a signature object.- Specified by:
toEncodable
in interfaceISignatureMechanismParams
- Returns:
- an
IASN1Encodable
object
-
apply
public void apply(java.security.Signature signature)
Apply the parameters to aSignature
.- Specified by:
apply
in interfaceIApplicableSignatureParams
- Parameters:
signature
- an uninitialisedSignature
object
-
-