get Data To Sign
This function provides unsigned byte array that needs to be signed.
The list of certificates may be empty to retrieve unsigned byte array, this is for cases where the certificate chain is not known beforehand (for instance, a signing service that issues short-lived certificates). In that case, it's assumed that the signed_data
parameter passed to finish_signature
will embed a complete signature with certificates, CRLs, etc., created by the external signing service. in such cases embedPKCS7Signature is used to embed the signature.
Where the certificate chain is known beforehand, the certificates are passed in the certificates
parameter to retrieve unsigned byte array. In this case embedSignature can be used to embed the signature. And can be signed with java.security.Signature.sign method.
Results can be extracted by com.pspdfkit.utils.Response.onSuccess or com.pspdfkit.utils.Response.onError
Return
com.pspdfkit.utils.Response with pair of ByteArray and HashAlgorithm
Parameters
Context of the application
SignerOptions contains various configurations needed for the signing.