public class PKCS12SignatureToken extends Object implements SignatureToken
Constructor and Description |
---|
PKCS12SignatureToken(String fileName,
char[] password)
Constructs PKCS12 signer object.
|
PKCS12SignatureToken(String fileName,
String password)
Constructs PKCS12 signer object.
|
PKCS12SignatureToken(String fileName,
String password,
String alias)
Constructs PKCS12 signer object.
|
PKCS12SignatureToken(String fileName,
String password,
X509Cert.KeyUsage keyUsage)
Constructs PKCS12 signer object.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getAlias()
Returns key entry alias in keyStore.
|
X509Certificate |
getCertificate()
Returns signer certificate
|
eu.europa.esig.dss.token.KeyStoreSignatureTokenConnection |
getSignatureTokenConnection()
Method for asking DSS signature token connection
|
byte[] |
sign(DigestAlgorithm digestAlgorithm,
byte[] dataToSign)
There must be implemented routines needed for signing
|
public PKCS12SignatureToken(String fileName, char[] password)
fileName
- .p12 file name and pathpassword
- keystore password as char arraypublic PKCS12SignatureToken(String fileName, String password)
fileName
- .p12 file name and pathpassword
- keystore password as Stringpublic PKCS12SignatureToken(String fileName, String password, String alias)
fileName
- .p12 file name and pathpassword
- keystore password as Stringalias
- known key aliaspublic PKCS12SignatureToken(String fileName, String password, X509Cert.KeyUsage keyUsage)
fileName
- .p12 file name and pathpassword
- keystore password as StringkeyUsage
- key usage value, default KeyUsageBit.nonRepudiationpublic eu.europa.esig.dss.token.KeyStoreSignatureTokenConnection getSignatureTokenConnection()
public X509Certificate getCertificate()
SignatureToken
getCertificate
in interface SignatureToken
public byte[] sign(DigestAlgorithm digestAlgorithm, byte[] dataToSign)
SignatureToken
sign
in interface SignatureToken
digestAlgorithm
- provides needed information for signingdataToSign
- data to signpublic void close()
close
in interface SignatureToken
public String getAlias()
Copyright © 2024. All rights reserved.