Loading...
Searching...
No Matches
pdftron::SDF::SignatureHandler Class Referenceabstract

`#include <SignatureHandler.h>`

## Public Member Functions
virtual UString | GetName () const
virtual void | AppendData (const std::vector< pdftron::UInt8 > &data)
virtual bool | Reset ()
virtual std::vector< pdftron::UInt8 > | CreateSignature ()
virtual SignatureHandler * | Clone () const =0
virtual | ~SignatureHandler ()

## Static Public Member Functions
static TRN_Exception TRN_SIGAPI | TRN_SignatureHandlerGetNameImpl (TRN_UString *out_name, void *derived)
static TRN_Exception TRN_SIGAPI | TRN_SignatureHandlerAppendDataImpl (const TRN_SignatureData in_data, void *derived)
static TRN_Exception TRN_SIGAPI | TRN_SignatureHandlerResetImpl (TRN_Bool *out_result, void *derived)
static TRN_Exception TRN_SIGAPI | TRN_SignatureHandlerCreateSignatureImpl (TRN_SignatureData *out_signature, void *derived)
static TRN_Exception TRN_SIGAPI | TRN_SignatureHandlerDestroyImpl (void *derived)

## Public Attributes
std::vector< pdftron::UInt8 > | m_signature_data

## Detailed Description

A base class for SignatureHandler. SignatureHandler instances are responsible for defining the digest and cipher algorithms to create and/or validate a signed PDF document. SignatureHandlers are added to PDFDoc instances by calling the PDFDoc::AddSignatureHandler method.

Definition at line 28 of file SignatureHandler.h.

## Constructor & Destructor Documentation

## ◆ ~SignatureHandler()

virtual pdftron::SDF::SignatureHandler::~SignatureHandler | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ AppendData()

virtual void pdftron::SDF::SignatureHandler::AppendData | ( | const std::vector< pdftron::UInt8 > & | data | ) |
| virtual

Adds data to be signed. This data will be the raw serialized byte buffer as the PDF is being saved to any stream.

Parameters

  data | A chunk of data to be signed.

## ◆ Clone()

virtual SignatureHandler * pdftron::SDF::SignatureHandler::Clone | ( |  | ) | const
| pure virtual

This method returns a cloned copy of the current instance.

Returns
  A new, cloned instance of SignatureHandler.

Note
  this method must be implemented in any derived class from SignatureHandler.

## ◆ CreateSignature()

virtual std::vector< pdftron::UInt8 > pdftron::SDF::SignatureHandler::CreateSignature | ( |  | ) |
| virtual

Calculates the actual signature using client implemented signing methods. The returned value (byte array) will be written as the /Contents entry in the signature dictionary.

Returns
  The calculated signature data.

## ◆ GetName()

virtual UString pdftron::SDF::SignatureHandler::GetName | ( |  | ) | const
| virtual

Gets the name of this SignatureHandler. The name of the SignatureHandler is what identifies this SignatureHandler from all others. This name is also added to the PDF as the value of /Filter entry in the signature dictionary.

Returns
  The name of this SignatureHandler.

## ◆ Reset()

virtual bool pdftron::SDF::SignatureHandler::Reset | ( |  | ) |
| virtual

Resets any data appending and signature calculations done so far. This method should allow PDFNet to restart the whole signature calculation process. It is important that when this method is invoked, any data processed with the AppendData method should be discarded.

Returns
  True if there are no errors, otherwise false.

## ◆ TRN_SignatureHandlerAppendDataImpl()

TRN_Exception TRN_SIGAPI pdftron::SDF::SignatureHandler::TRN_SignatureHandlerAppendDataImpl | ( | const TRN_SignatureData | in_data,
|  | void * | derived )
| static

## ◆ TRN_SignatureHandlerCreateSignatureImpl()

TRN_Exception TRN_SIGAPI pdftron::SDF::SignatureHandler::TRN_SignatureHandlerCreateSignatureImpl | ( | TRN_SignatureData * | out_signature,
|  | void * | derived )
| static

## ◆ TRN_SignatureHandlerDestroyImpl()

TRN_Exception TRN_SIGAPI pdftron::SDF::SignatureHandler::TRN_SignatureHandlerDestroyImpl | ( | void * | derived | ) |
| static

## ◆ TRN_SignatureHandlerGetNameImpl()

TRN_Exception TRN_SIGAPI pdftron::SDF::SignatureHandler::TRN_SignatureHandlerGetNameImpl | ( | TRN_UString * | out_name,
|  | void * | derived )
| static

## ◆ TRN_SignatureHandlerResetImpl()

TRN_Exception TRN_SIGAPI pdftron::SDF::SignatureHandler::TRN_SignatureHandlerResetImpl | ( | TRN_Bool * | out_result,
|  | void * | derived )
| static

## Member Data Documentation

## ◆ m_signature_data

std::vector<pdftron::UInt8> pdftron::SDF::SignatureHandler::m_signature_data

Definition at line 79 of file SignatureHandler.h.

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

- SDF/SignatureHandler.h