- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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

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

Destructor.

## Member Function Documentation

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.

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.

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.

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.

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.

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

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

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

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

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

## Member Data Documentation

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