Package eu.europa.esig.dss.token
Class AbstractSignatureTokenConnection
java.lang.Object
eu.europa.esig.dss.token.AbstractSignatureTokenConnection
- All Implemented Interfaces:
SignatureTokenConnection,AutoCloseable
- Direct Known Subclasses:
AbstractKeyStoreTokenConnection
public abstract class AbstractSignatureTokenConnection extends Object implements SignatureTokenConnection
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerLOG -
Constructor Summary
Constructors Constructor Description AbstractSignatureTokenConnection() -
Method Summary
Modifier and Type Method Description protected AlgorithmParameterSpeccreatePSSParam(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgo)protected SignaturegetSignatureInstance(String javaSignatureAlgorithm)SignatureValuesign(ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, eu.europa.esig.dss.enumerations.MaskGenerationFunction mgf, DSSPrivateKeyEntry keyEntry)This method signs thetoBeSigneddata with the digestdigestAlgorithm, the maskmgfand the givenkeyEntry.SignatureValuesign(ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, DSSPrivateKeyEntry keyEntry)This method signs thetoBeSigneddata with the digestdigestAlgorithmand the givenkeyEntry.SignatureValuesignDigest(Digest digest, eu.europa.esig.dss.enumerations.MaskGenerationFunction mgf, DSSPrivateKeyEntry keyEntry)This method signs thedigestdata with the givenkeyEntry.SignatureValuesignDigest(Digest digest, DSSPrivateKeyEntry keyEntry)This method signs thedigestdata with the givenkeyEntry.
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
AbstractSignatureTokenConnection
public AbstractSignatureTokenConnection()
-
-
Method Details
-
sign
public SignatureValue sign(ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, DSSPrivateKeyEntry keyEntry) throws DSSExceptionDescription copied from interface:SignatureTokenConnectionThis method signs thetoBeSigneddata with the digestdigestAlgorithmand the givenkeyEntry.- Specified by:
signin interfaceSignatureTokenConnection- Parameters:
toBeSigned- The data that need to be signeddigestAlgorithm- The digest algorithm to be used before signingkeyEntry- The private key to be used- Returns:
- the signature value representation with the used algorithm and the binary value
- Throws:
DSSException- If there is any problem during the signature process
-
sign
public SignatureValue sign(ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, eu.europa.esig.dss.enumerations.MaskGenerationFunction mgf, DSSPrivateKeyEntry keyEntry) throws DSSExceptionDescription copied from interface:SignatureTokenConnectionThis method signs thetoBeSigneddata with the digestdigestAlgorithm, the maskmgfand the givenkeyEntry.- Specified by:
signin interfaceSignatureTokenConnection- Parameters:
toBeSigned- The data that need to be signeddigestAlgorithm- The digest algorithm to be used before signingmgf- the mask generation functionkeyEntry- The private key to be used- Returns:
- the signature value representation with the used algorithm and the binary value
- Throws:
DSSException- If there is any problem during the signature process
-
signDigest
Description copied from interface:SignatureTokenConnectionThis method signs thedigestdata with the givenkeyEntry.- Specified by:
signDigestin interfaceSignatureTokenConnection- Parameters:
digest- The digested data that need to be signedkeyEntry- The private key to be used- Returns:
- the signature value representation with the used algorithm and the binary value
- Throws:
DSSException- If there is any problem during the signature process
-
signDigest
public SignatureValue signDigest(Digest digest, eu.europa.esig.dss.enumerations.MaskGenerationFunction mgf, DSSPrivateKeyEntry keyEntry) throws DSSExceptionDescription copied from interface:SignatureTokenConnectionThis method signs thedigestdata with the givenkeyEntry.- Specified by:
signDigestin interfaceSignatureTokenConnection- Parameters:
digest- The digested data that need to be signedmgf- the mask generation functionkeyEntry- The private key to be used- Returns:
- the signature value representation with the used algorithm and the binary value
- Throws:
DSSException- If there is any problem during the signature process
-
getSignatureInstance
protected Signature getSignatureInstance(String javaSignatureAlgorithm) throws NoSuchAlgorithmException- Throws:
NoSuchAlgorithmException
-
createPSSParam
protected AlgorithmParameterSpec createPSSParam(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgo)
-