- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractKeyStoreTokenConnection,AbstractSignatureTokenConnection,AppleSignatureToken,JKSSignatureToken,KeyStoreSignatureTokenConnection,MSCAPISignatureToken,Pkcs11SignatureToken,Pkcs12SignatureToken
Connection through available API to the QSCD (SmartCard, MSCAPI, PKCS#12)
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getKeys()Retrieves all the available keys (private keys entries) from the token.eu.europa.esig.dss.model.SignatureValuesign(eu.europa.esig.dss.model.ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, DSSPrivateKeyEntry keyEntry) This method signs thetoBeSigneddata with the digestdigestAlgorithmand the givenkeyEntry.eu.europa.esig.dss.model.SignatureValuesign(eu.europa.esig.dss.model.ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry) This method signs thetoBeSigneddata with the pre-defined signature algorithmsignatureAlgorithm, and the givenkeyEntry.eu.europa.esig.dss.model.SignatureValuesignDigest(eu.europa.esig.dss.model.Digest digest, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry) This method signs thedigestdata with the pre-definedsignatureAlgorithmand the givenkeyEntry.eu.europa.esig.dss.model.SignatureValuesignDigest(eu.europa.esig.dss.model.Digest digest, DSSPrivateKeyEntry keyEntry) This method signs thedigestdata with the givenkeyEntry.
-
Method Details
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-
getKeys
Retrieves all the available keys (private keys entries) from the token.- Returns:
- List of encapsulated private keys
- Throws:
eu.europa.esig.dss.model.DSSException- If there is any problem during the retrieval process
-
sign
eu.europa.esig.dss.model.SignatureValue sign(eu.europa.esig.dss.model.ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, DSSPrivateKeyEntry keyEntry) throws eu.europa.esig.dss.model.DSSException This method signs thetoBeSigneddata with the digestdigestAlgorithmand the givenkeyEntry.- 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:
eu.europa.esig.dss.model.DSSException- If there is any problem during the signature process
-
sign
eu.europa.esig.dss.model.SignatureValue sign(eu.europa.esig.dss.model.ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry) throws eu.europa.esig.dss.model.DSSException This method signs thetoBeSigneddata with the pre-defined signature algorithmsignatureAlgorithm, and the givenkeyEntry.- Parameters:
toBeSigned- The data that need to be signedsignatureAlgorithm- The signature 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:
eu.europa.esig.dss.model.DSSException- If there is any problem during the signature process
-
signDigest
eu.europa.esig.dss.model.SignatureValue signDigest(eu.europa.esig.dss.model.Digest digest, DSSPrivateKeyEntry keyEntry) throws eu.europa.esig.dss.model.DSSException This method signs thedigestdata with the givenkeyEntry.- 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:
eu.europa.esig.dss.model.DSSException- If there is any problem during the signature process
-
signDigest
eu.europa.esig.dss.model.SignatureValue signDigest(eu.europa.esig.dss.model.Digest digest, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry) throws eu.europa.esig.dss.model.DSSException This method signs thedigestdata with the pre-definedsignatureAlgorithmand the givenkeyEntry.- Parameters:
digest- The digested data that need to be signedsignatureAlgorithm- The signature algorithmkeyEntry- The private key to be used- Returns:
- the signature value representation with the used algorithm and the binary value
- Throws:
eu.europa.esig.dss.model.DSSException- If there is any problem during the signature process
-