Package eu.europa.esig.dss.signature
Class AbstractSignatureParametersBuilder<SP extends AbstractSignatureParameters>
java.lang.Object
eu.europa.esig.dss.signature.AbstractSignatureParametersBuilder<SP>
- Type Parameters:
SP
-AbstractSignatureParameters
- All Implemented Interfaces:
SignatureParametersBuilder<SP>
- Direct Known Subclasses:
TrustedListSignatureParametersBuilder
public abstract class AbstractSignatureParametersBuilder<SP extends AbstractSignatureParameters>
extends Object
implements SignatureParametersBuilder<SP>
An abstract class to build a signature parameters instance
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractSignatureParametersBuilder
(CertificateToken signingCertificate) The default constructorprotected
AbstractSignatureParametersBuilder
(CertificateToken signingCertificate, List<CertificateToken> certificateChain) A constructor with a certificateChain -
Method Summary
Modifier and TypeMethodDescriptionbLevel()
ReturnsBLevelParameters
build()
Creates a Signature Parameters instanceprotected abstract SP
Initialize and return empty signature parameterssetBLevelParams
(BLevelParameters bLevelParams) Sets a BLevelParameters (e.g. a SigningDate)setDigestAlgorithm
(DigestAlgorithm digestAlgorithm) Sets a digest algorithm to be used to hash the signed datasetEncryptionAlgorithm
(EncryptionAlgorithm encryptionAlgorithm) Sets an encryption algorithm used by the signing-certificate's key pair.setMaskGenerationFunction
(MaskGenerationFunction maskGenerationFunction) Deprecated.since DSS 6.1.
-
Constructor Details
-
AbstractSignatureParametersBuilder
The default constructor- Parameters:
signingCertificate
-CertificateToken
-
AbstractSignatureParametersBuilder
protected AbstractSignatureParametersBuilder(CertificateToken signingCertificate, List<CertificateToken> certificateChain) A constructor with a certificateChain- Parameters:
signingCertificate
-CertificateToken
certificateChain
- a list ofCertificateToken
s
-
-
Method Details
-
initParameters
Initialize and return empty signature parameters- Returns:
SP
signature parameters
-
setEncryptionAlgorithm
public AbstractSignatureParametersBuilder setEncryptionAlgorithm(EncryptionAlgorithm encryptionAlgorithm) Sets an encryption algorithm used by the signing-certificate's key pair.- Parameters:
encryptionAlgorithm
-EncryptionAlgorithm
- Returns:
- this
AbstractSignatureParametersBuilder
-
setDigestAlgorithm
Sets a digest algorithm to be used to hash the signed data- Parameters:
digestAlgorithm
-DigestAlgorithm
- Returns:
- this
AbstractSignatureParametersBuilder
-
setMaskGenerationFunction
@Deprecated public AbstractSignatureParametersBuilder setMaskGenerationFunction(MaskGenerationFunction maskGenerationFunction) Deprecated.since DSS 6.1. Please use#setEncryptionAlgorithm
specifying correct algorithm (i.e. EncryptionAlgorithm.RSA for none MGF, EncryptionAlgorithm.RSASSA_PSS for MGF1)Sets a mask generation function, when required- Parameters:
maskGenerationFunction
-MaskGenerationFunction
- Returns:
- this
AbstractSignatureParametersBuilder
-
bLevel
-
setBLevelParams
Sets a BLevelParameters (e.g. a SigningDate)- Parameters:
bLevelParams
-BLevelParameters
to be used- Returns:
- the builder
-
build
Description copied from interface:SignatureParametersBuilder
Creates a Signature Parameters instance- Specified by:
build
in interfaceSignatureParametersBuilder<SP extends AbstractSignatureParameters>
- Returns:
SP
signature parameters
-