@protocol PSPDFExternalSignature <NSObject>
protocol ExternalSignature : NSObjectProtocol
The PSPDFExternalSignature protocol is adopted by an object that provides an external signature for a PDF document. You set the externalSignatureDelegate property in a PSPDFSigner class or subclass when you want to control the digital signing process with an external signature (for example, a signature that is implemented by a hardware device or by an external webservice).
This callback method is invoked when the digital signing process needs to cryptographically sign a hash of a PDF document. Read the digital signature guides for more information about the digital signing process.
- (nonnull NSData *)signData:(nonnull NSData *)data hashAlgorithm:(PSPDFSignatureHashAlgorithm)hashAlgorithm;
func sign(_ data: Data, hashAlgorithm: PDFSignatureHashAlgorithm) -> Data
The part of the document that needs to be hashed and signed before creating the digital signature.
The hash algorithm that must be used to digest the
The signed data. Note that you must sign the data using the correspondent private key to the certificate that was used when the signing process was started (see in
signFormElement:family of methods). Otherwise, the digital signature will be invalid.
The encryption algorithm to use in the digital signing process.
func encryptionAlgorithm() -> PDFSignatureEncryptionAlgorithm