Class KSPrivateKeyEntry

java.lang.Object
eu.europa.esig.dss.token.KSPrivateKeyEntry
All Implemented Interfaces:
DSSPrivateKeyAccessEntry, DSSPrivateKeyEntry

public class KSPrivateKeyEntry extends Object implements DSSPrivateKeyAccessEntry
Wrapper of a PrivateKeyEntry coming from a KeyStore.
  • Constructor Details

    • KSPrivateKeyEntry

      public KSPrivateKeyEntry(String alias, KeyStore.PrivateKeyEntry privateKeyEntry)
      The default constructor for KSPrivateKeyEntry.
      Parameters:
      alias - the given alias
      privateKeyEntry - the keystore private key entry
  • Method Details

    • getAlias

      public String getAlias()
      Get the entry alias
      Returns:
      the alias
    • getCertificate

      public eu.europa.esig.dss.model.x509.CertificateToken getCertificate()
      Description copied from interface: DSSPrivateKeyEntry
      Retrieve the signing certificate
      Specified by:
      getCertificate in interface DSSPrivateKeyEntry
      Returns:
      the certificate
    • getCertificateChain

      public eu.europa.esig.dss.model.x509.CertificateToken[] getCertificateChain()
      Description copied from interface: DSSPrivateKeyEntry
      Retrieve the certificate chain linked
      Specified by:
      getCertificateChain in interface DSSPrivateKeyEntry
      Returns:
      the chain of certificates
    • getPrivateKey

      public PrivateKey getPrivateKey()
      Description copied from interface: DSSPrivateKeyAccessEntry
      Gets the private key
      Specified by:
      getPrivateKey in interface DSSPrivateKeyAccessEntry
      Returns:
      the private key
    • getEncryptionAlgorithm

      public eu.europa.esig.dss.enumerations.EncryptionAlgorithm getEncryptionAlgorithm()
      Description copied from interface: DSSPrivateKeyEntry
      Get the EncryptionAlgorithm corresponding to the PrivateKey
      Specified by:
      getEncryptionAlgorithm in interface DSSPrivateKeyEntry
      Returns:
      the EncryptionAlgorithm (RSA, ECDSA,...)