| java.lang.Object | |
| ↳ | com.pspdfkit.signatures.provider.PrivateKeySignatureProvider |
Signature provider using a KeyStore.PrivateKeyEntry to sign document data. The used private key has to be in either PKCS#8 or PKCS#1 format, or this class will throw an exception while instantiation.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
PrivateKeySignatureProvider(KeyStore.PrivateKeyEntry privateKey)
Create the signature provider using the given
privateKey. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| EncryptionAlgorithm |
getEncryptionAlgorithm()
Returns the encryption algorithm used by this signature provider.
| ||||||||||
| byte[] |
signData(byte[] data, HashAlgorithm hashAlgorithm)
Returns a hash from signing the given data.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pspdfkit.signatures.provider.SignatureProvider
| |||||||||||
Create the signature provider using the given privateKey. If the key is not in PKCS#8 or PKCS#1 format or decoding of the key fails, this
method will throw a CertificateEncodingException.
| privateKey | A private key entry in PKCS#8 or PKCS#1 format. |
|---|
| CertificateEncodingException | Thrown if the given private key is in the wrong format or could not be decoded. |
|---|
Returns the encryption algorithm used by this signature provider.
EncryptionAlgorithm that this provider will use to sign the hashed data.
Returns a hash from signing the given data.
| data | Data that should be hashed and signed. |
|---|---|
| hashAlgorithm | Hash algorithm that should be applied to data before signing it. |