Interface SignatureTokenConnection

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
AbstractKeyStoreTokenConnection, AbstractSignatureTokenConnection, AppleSignatureToken, JKSSignatureToken, KeyStoreSignatureTokenConnection, MSCAPISignatureToken, Pkcs11SignatureToken, Pkcs12SignatureToken

public interface SignatureTokenConnection extends AutoCloseable
Connection through available API to the QSCD (SmartCard, MSCAPI, PKCS#12)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Retrieves all the available keys (private keys entries) from the token.
    eu.europa.esig.dss.model.SignatureValue
    sign(eu.europa.esig.dss.model.ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, DSSPrivateKeyEntry keyEntry)
    This method signs the toBeSigned data with the digest digestAlgorithm and the given keyEntry.
    eu.europa.esig.dss.model.SignatureValue
    sign(eu.europa.esig.dss.model.ToBeSigned toBeSigned, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry)
    This method signs the toBeSigned data with the pre-defined signature algorithm signatureAlgorithm, and the given keyEntry.
    eu.europa.esig.dss.model.SignatureValue
    signDigest(eu.europa.esig.dss.model.Digest digest, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, DSSPrivateKeyEntry keyEntry)
    This method signs the digest data with the pre-defined signatureAlgorithm and the given keyEntry.
    eu.europa.esig.dss.model.SignatureValue
    signDigest(eu.europa.esig.dss.model.Digest digest, DSSPrivateKeyEntry keyEntry)
    This method signs the digest data with the given keyEntry.
  • Method Details

    • close

      void close()
      Specified by:
      close in interface AutoCloseable
    • getKeys

      List<DSSPrivateKeyEntry> getKeys() throws eu.europa.esig.dss.model.DSSException
      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 the toBeSigned data with the digest digestAlgorithm and the given keyEntry.
      Parameters:
      toBeSigned - The data that need to be signed
      digestAlgorithm - The digest algorithm to be used before signing
      keyEntry - 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 the toBeSigned data with the pre-defined signature algorithm signatureAlgorithm, and the given keyEntry.
      Parameters:
      toBeSigned - The data that need to be signed
      signatureAlgorithm - The signature algorithm to be used before signing
      keyEntry - 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 the digest data with the given keyEntry.
      Parameters:
      digest - The digested data that need to be signed
      keyEntry - 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 the digest data with the pre-defined signatureAlgorithm and the given keyEntry.
      Parameters:
      digest - The digested data that need to be signed
      signatureAlgorithm - The signature algorithm
      keyEntry - 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