Package eu.europa.esig.dss.token
Class KSPrivateKeyEntry
java.lang.Object
eu.europa.esig.dss.token.KSPrivateKeyEntry
- All Implemented Interfaces:
DSSPrivateKeyEntry
Wrapper of a PrivateKeyEntry coming from a KeyStore.
-
Constructor Summary
ConstructorDescriptionKSPrivateKeyEntry
(String alias, KeyStore.PrivateKeyEntry privateKeyEntry) The default constructor for KSPrivateKeyEntry. -
Method Summary
Modifier and TypeMethodDescriptiongetAlias()
Get the entry aliasRetrieve the signing certificateRetrieve the certificate chain linkedGet the EncryptionAlgorithm corresponding to the PrivateKeyGet the private key
-
Constructor Details
-
KSPrivateKeyEntry
The default constructor for KSPrivateKeyEntry.- Parameters:
alias
- the given aliasprivateKeyEntry
- the keystore private key entry
-
-
Method Details
-
getAlias
Get the entry alias- Returns:
- the alias
-
getCertificate
Description copied from interface:DSSPrivateKeyEntry
Retrieve the signing certificate- Specified by:
getCertificate
in interfaceDSSPrivateKeyEntry
- Returns:
- the certificate
-
getCertificateChain
Description copied from interface:DSSPrivateKeyEntry
Retrieve the certificate chain linked- Specified by:
getCertificateChain
in interfaceDSSPrivateKeyEntry
- Returns:
- the chain of certificates
-
getPrivateKey
Get the private key- Returns:
- the private key
-
getEncryptionAlgorithm
Description copied from interface:DSSPrivateKeyEntry
Get the EncryptionAlgorithm corresponding to the PrivateKey- Specified by:
getEncryptionAlgorithm
in interfaceDSSPrivateKeyEntry
- Returns:
- the EncryptionAlgorithm (RSA, ECDSA,...)
- Throws:
DSSException
- if the encryption algorithm cannot be detected
-