PoDoFo 1.1.0
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
PoDoFo::PdfSigningContext Class Referencefinal

A context that can be used to customize the signing process. More...

#include <PdfSigningContext.h>

Public Member Functions

std::unique_ptr< PdfMemDocumentRestore (std::shared_ptr< StreamDevice > device)
 Restore a dumped signing context from an input stream device.
 
PdfSignerId AddSigner (const PdfSignature &signature, std::shared_ptr< PdfSigner > signer)
 Configure a signer on the specific signature field.
 
void Sign (PdfMemDocument &doc, StreamDevice &device, PdfSaveOptions options=PdfSaveOptions::None)
 Start a blocking event-driven signing procedure.
 
void StartSigning (PdfMemDocument &doc, std::shared_ptr< StreamDevice > device, PdfSigningResults &results, PdfSaveOptions saveOptions=PdfSaveOptions::None)
 Start a deferred (aka "async") signing procedure.
 
void FinishSigning (const PdfSigningResults &processedResults)
 Finish a deferred (aka "async") signing procedure.
 
void DumpInPlace ()
 Dump the signing context so it can be resumed later.
 
std::shared_ptr< PdfSigner > GetSignerEntry (const PdfReference &signatureRef)
 Get the fist signer entry from the context for the given input signature.
 
std::shared_ptr< PdfSigner > GetSignerEntry (const std::string_view &fullName, PdfReference &signatureRef)
 Get the fist signer entry from the context for the given input signature.
 
bool IsEmpty () const
 

Friends

PODOFO_API void SignDocument (PdfMemDocument &doc, StreamDevice &device, PdfSigner &signer, PdfSignature &signature, PdfSaveOptions saveOptions)
 Sign the document on the given signature field.
 

Detailed Description

A context that can be used to customize the signing process.

It also enables the deferred (aka "async") signing, which is a mean to separately process the intermediate results of signing (normally a hash to sign) that doesn't require a streamlined event based processing. It can be issued by starting the process with StartSigning() and finishing it with FinishSigning()

Member Function Documentation

◆ DumpInPlace()

void PdfSigningContext::DumpInPlace ( )

Dump the signing context so it can be resumed later.

Remarks
Can be used only after starting a deferred (aka "async") signing operation. This will effectively disable further operations on this context

◆ FinishSigning()

void PdfSigningContext::FinishSigning ( const PdfSigningResults processedResults)

Finish a deferred (aka "async") signing procedure.

Parameters
processedResultsresults that will be used to finalize the signatures

◆ StartSigning()

void PdfSigningContext::StartSigning ( PdfMemDocument doc,
std::shared_ptr< StreamDevice device,
PdfSigningResults results,
PdfSaveOptions  saveOptions = PdfSaveOptions::None 
)

Start a deferred (aka "async") signing procedure.

Parameters
resultsinstance where intermediate results will be stored

Friends And Related Symbol Documentation

◆ SignDocument

PODOFO_API void SignDocument ( PdfMemDocument doc,
StreamDevice device,
PdfSigner &  signer,
PdfSignature &  signature,
PdfSaveOptions  saveOptions 
)
friend

Sign the document on the given signature field.

Parameters
docthe document to be signed
devicethe input/output device where the document will be saved
signerthe signer implementation that will compute the signature
signaturethe signature field where the signature will be applied
optionsdocument saving options

The documentation for this class was generated from the following files: