Show / Hide Table of Contents

# Class SignatureHandler

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

##### Inheritance

object
SignatureHandler

##### Inherited Members

object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: pdftron.SDF

###### Assembly: PDFNet.dll

##### Syntax

    public abstract class SignatureHandler

### Constructors

#### SignatureHandler()

##### Declaration

    public SignatureHandler()

### Methods

#### AppendData(byte[])

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

##### Declaration

    public abstract void AppendData(byte[] data)

##### Parameters

Type | Name | Description
--- | --- | ---
byte[] | data | A chunk of data to be signed.

#### CreateSignature()

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.

##### Declaration

    public abstract byte[] CreateSignature()

##### Returns

Type | Description
--- | ---
byte[] | The calculated signature data.

#### GetName()

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.

##### Declaration

    public abstract string GetName()

##### Returns

Type | Description
--- | ---
string | The name of this SignatureHandler.

#### Reset()

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.

##### Declaration

    public abstract bool Reset()

##### Returns

Type | Description
--- | ---
bool | True if there are no errors, otherwise false.