Package eu.europa.esig.dss.token
Interface SignatureTokenConnection
- 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 TypeMethodDescriptionvoid
close()
getKeys()
Retrieves all the available keys (private keys entries) from the token.sign
(ToBeSigned toBeSigned, DigestAlgorithm digestAlgorithm, MaskGenerationFunction mgf, DSSPrivateKeyEntry keyEntry) This method signs thetoBeSigned
data with the digestdigestAlgorithm
, the maskmgf
and the givenkeyEntry
.sign
(ToBeSigned toBeSigned, DigestAlgorithm digestAlgorithm, DSSPrivateKeyEntry keyEntry) This method signs thetoBeSigned
data with the digestdigestAlgorithm
and the givenkeyEntry
.sign
(ToBeSigned toBeSigned, SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry) This method signs thetoBeSigned
data with the pre-defined signature algorithmsignatureAlgorithm
, and the givenkeyEntry
.signDigest
(Digest digest, MaskGenerationFunction mgf, DSSPrivateKeyEntry keyEntry) This method signs thedigest
data with the givenkeyEntry
.signDigest
(Digest digest, SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry) This method signs thedigest
data with the pre-definedsignatureAlgorithm
and the givenkeyEntry
.signDigest
(Digest digest, DSSPrivateKeyEntry keyEntry) This method signs thedigest
data with the givenkeyEntry
.
-
Method Details
-
close
void close()- Specified by:
close
in interfaceAutoCloseable
-
getKeys
Retrieves all the available keys (private keys entries) from the token.- Returns:
- List of encapsulated private keys
- Throws:
DSSException
- If there is any problem during the retrieval process
-
sign
SignatureValue sign(ToBeSigned toBeSigned, DigestAlgorithm digestAlgorithm, DSSPrivateKeyEntry keyEntry) throws DSSException This method signs thetoBeSigned
data with the digestdigestAlgorithm
and 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:
DSSException
- If there is any problem during the signature process
-
sign
SignatureValue sign(ToBeSigned toBeSigned, DigestAlgorithm digestAlgorithm, MaskGenerationFunction mgf, DSSPrivateKeyEntry keyEntry) throws DSSException This method signs thetoBeSigned
data with the digestdigestAlgorithm
, the maskmgf
and the givenkeyEntry
.- 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
-
sign
SignatureValue sign(ToBeSigned toBeSigned, SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry) throws DSSException This method signs thetoBeSigned
data 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:
DSSException
- If there is any problem during the signature process
-
signDigest
This method signs thedigest
data 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:
DSSException
- If there is any problem during the signature process
-
signDigest
SignatureValue signDigest(Digest digest, MaskGenerationFunction mgf, DSSPrivateKeyEntry keyEntry) throws DSSException This method signs thedigest
data with the givenkeyEntry
.- 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
-
signDigest
SignatureValue signDigest(Digest digest, SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry) throws DSSException This method signs thedigest
data with the pre-definedsignatureAlgorithm
and 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:
DSSException
- If there is any problem during the signature process
-