Package org.webpki.crypto
Class KeyStoreSigner
java.lang.Object
org.webpki.crypto.KeyStoreSigner
- All Implemented Interfaces:
AsymKeySignerInterface
,CertificateSelectorSpi
,X509SignerInterface
Sign data using the KeyStore interface.
-
Constructor Summary
ConstructorDescriptionKeyStoreSigner
(KeyStore signerCertKeystore, KeyContainerTypes containerType) -
Method Summary
Modifier and TypeMethodDescriptionecdsaAsn1SignatureEncoding
(boolean derEncoded) Get signature algorithm.Get certificate path.void
setAlgorithm
(AsymSignatureAlgorithms algorithm) setExtendedCertPath
(boolean flag) byte[]
signData
(byte[] data) Sign data.
-
Constructor Details
-
KeyStoreSigner
-
-
Method Details
-
getCertificateSelection
public CertificateSelection getCertificateSelection(CertificateFilter[] cfs) throws GeneralSecurityException - Specified by:
getCertificateSelection
in interfaceCertificateSelectorSpi
- Throws:
GeneralSecurityException
-
getCertificatePath
Description copied from interface:X509SignerInterface
Get certificate path.- Specified by:
getCertificatePath
in interfaceX509SignerInterface
- Returns:
- Certificate path
-
ecdsaAsn1SignatureEncoding
-
signData
public byte[] signData(byte[] data) Description copied from interface:AsymKeySignerInterface
Sign data.- Specified by:
signData
in interfaceAsymKeySignerInterface
- Parameters:
data
- Data to sign- Returns:
- Signed data
-
setKey
- Throws:
GeneralSecurityException
-
setExtendedCertPath
-
setAlgorithm
-
getAlgorithm
Description copied from interface:AsymKeySignerInterface
Get signature algorithm.- Specified by:
getAlgorithm
in interfaceAsymKeySignerInterface
- Returns:
- Signature algorithm
-