java.lang.Object | |
↳ | com.pspdfkit.signatures.contents.PKCS7 |
A representation of a PKCS7 structure that can be contained in a digital signature field.
For example, you can use an instance of this class when you want to sign a document that was already prepared for deferred digital signing. One example scenario may be the following:
prepareFormFieldForSigningAsync(SignerOptions)
.
embedSignatureInFormFieldAsync(SignatureFormField, SignatureContents, OutputStream)
. In your custom implementation of the SignatureContents
interface
that you pass to this method, you can return getPKCS7EncodedData()
from inside the
signData(byte[])
method.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static PKCS7 |
create(byte[] digest, KeyStore.PrivateKeyEntry privateKey, HashAlgorithm hashAlgorithm)
This method is deprecated.
Please use
create(byte[], KeyStore.PrivateKeyEntry, HashAlgorithm, FilterSubtype) instead, which replaces this
method.
| ||||||||||
static PKCS7 |
create(byte[] digest, KeyStore.PrivateKeyEntry privateKey, HashAlgorithm hashAlgorithm, FilterSubtype filterSubtype)
Creates an instance of a PKCS7 container.
| ||||||||||
byte[] |
getPKCS7EncodedData()
Returns PKCS7 container as raw byte array.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
This method is deprecated.
Please use create(byte[], KeyStore.PrivateKeyEntry, HashAlgorithm, FilterSubtype)
instead, which replaces this
method.
Creates an instance of a PKCS7 container with a filter subtype set to ADOBE_PKCS7_DETACHED
.
digest | The digest data that will be cryptographically protected by this PKCS7. For digital signatures this is typically hash of the PDF document except the signature contents. |
---|---|
privateKey | The private key that will be used to encrypt the digest. |
hashAlgorithm | The hash algorithm that was used to hash the digest argument. |
CertificateEncodingException |
---|
Creates an instance of a PKCS7 container.
digest | The digest data that will be cryptographically protected by this PKCS7. For digital signatures this is typically hash of the PDF document except the signature contents. |
---|---|
privateKey | The private key that will be used to encrypt the digest. |
hashAlgorithm | The hash algorithm that was used to hash the digest argument. |
filterSubtype | Filter subtype for encoding or format that will be used to create the signature. |
CertificateEncodingException |
---|
Returns PKCS7 container as raw byte array.