finishSignature

public final void finishSignature(Document preparedDocument, String outputPath, Array<byte> signedData, DigitalSignatureOptions options)

Completes external signing (phase two) with a raw signature value produced by an external signer. The signing certificate and hash algorithm must be supplied again and must be identical to the ones used at prepare time: the signature value is verified against the prepared data before it is embedded, and any mismatch fails with an error instead of producing an invalid signature. Use when the external service returns a complete signature container instead of a raw value.

Parameters

preparedDocument

The prepared document returned by .

outputPath

The path where the signed PDF will be saved.

signedData

The raw signature value over the prepared bytes.

options

The digital signature options with the same certificate used to prepare.


public final void finishSignature(Document preparedDocument, FileOutputStream output, Array<byte> signedData, DigitalSignatureOptions options)

Completes external signing (phase two) with a raw signature value, writing the result to a stream.

Parameters

preparedDocument

The prepared document.

output

The output stream where the signed PDF will be written.

signedData

The raw signature value over the prepared bytes.

options

The digital signature options with the same certificate used to prepare.