Package xades4j.production
Class SignatureAlgorithms
java.lang.Object
xades4j.production.SignatureAlgorithms
Configuration of the algorithms used for signature production.
The defaults are:
- Signature: RSA(RSA_SHA256), DSA(DSA_SHA1), EC(ECDSA_SHA256)
- Canonicalization: Canonical XML 1.0 without comments
- Digest: SHA256
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the canonicalization algorithm to be used in theSignature
.Sets the canonicalization algorithm to be used in the qualifying properties that contain time-stamp tokens.withDigestAlgorithmForDataObjectReferences
(String algorithm) Sets the digest algorithm to be used in the data objectReference
s.withDigestAlgorithmForReferenceProperties
(String algorithm) Sets the digest algorithm to be used in the qualifying properties that contain references to certificates, CRLs and so on.withDigestAlgorithmForTimeStampProperties
(String algorithm) Sets the digest algorithm to be used in the qualifying properties that contain time-stamp tokens.withSignatureAlgorithm
(String keyAlgorithmName, String signatureAlgorithm) Set the signature algorithm to be used when the signing key has the given key algorithm.
-
Constructor Details
-
SignatureAlgorithms
public SignatureAlgorithms()
-
-
Method Details
-
withSignatureAlgorithm
public SignatureAlgorithms withSignatureAlgorithm(String keyAlgorithmName, String signatureAlgorithm) Set the signature algorithm to be used when the signing key has the given key algorithm.- Parameters:
keyAlgorithmName
- the key's algorithm name as defined in JCA standard algorithm namessignatureAlgorithm
- the signature algorithm- Returns:
- the current instance
-
withCanonicalizationAlgorithmForSignature
Sets the canonicalization algorithm to be used in theSignature
.- Parameters:
algorithm
- the algorithm- Returns:
- the current instance
-
withCanonicalizationAlgorithmForTimeStampProperties
Sets the canonicalization algorithm to be used in the qualifying properties that contain time-stamp tokens.- Parameters:
algorithm
- the algorithm- Returns:
- the current instance
-
withDigestAlgorithmForDataObjectReferences
Sets the digest algorithm to be used in the data objectReference
s.- Parameters:
algorithm
- the algorithm- Returns:
- the current instance
-
withDigestAlgorithmForReferenceProperties
Sets the digest algorithm to be used in the qualifying properties that contain references to certificates, CRLs and so on.- Parameters:
algorithm
- the algorithm- Returns:
- the current instance
-
withDigestAlgorithmForTimeStampProperties
Sets the digest algorithm to be used in the qualifying properties that contain time-stamp tokens.- Parameters:
algorithm
- the algorithm- Returns:
- the current instance
-