Vanilla.PDF  1.5.1
Cross-platform toolkit for creating and modifying PDF documents
List of all members
SigningKeyHandle Class Reference

Used for document signing. More...

Inheritance diagram for SigningKeyHandle:
IUnknownHandle PKCS12KeyHandle
typedef error_type(* SigningKey_Initialize_Function) (void *user_data, MessageDigestAlgorithmType algorithm)
 Initialize signing engine using selected digest algorithm. More...
 
typedef error_type(* SigningKey_Update_Function) (void *user_data, const BufferHandle *data)
 Insert data into engine for digest calculation. More...
 
typedef error_type(* SigningKey_Final_Function) (void *user_data, BufferHandle **result)
 Finish the digest calculation and return signed hash. More...
 
typedef void(* SigningKey_Cleanup_Function) (void *user_data)
 Cleanup all dependencies after the signing process has finished. More...
 
error_type SigningKey_CreateCustom (SigningKey_Initialize_Function sign_init, SigningKey_Update_Function sign_update, SigningKey_Final_Function sign_final, SigningKey_Cleanup_Function sign_cleanup, void *user_data, SigningKeyHandle **result)
 Creates a custom SigningKeyHandle to provide custom sign operation.
 
error_type SigningKey_ToUnknown (SigningKeyHandle *handle, IUnknownHandle **result)
 Reinterpret current object as IUnknownHandle.
 
error_type SigningKey_FromUnknown (IUnknownHandle *handle, SigningKeyHandle **result)
 Convert IUnknownHandle to BufferHandle.
 
error_type SigningKey_Release (SigningKeyHandle *handle)
 Decrement the internal reference counter. More...
 

Additional Inherited Members

- Public Member Functions inherited from IUnknownHandle
error_type IUnknown_AddRef (IUnknownHandle *handle)
 Increment the internal reference counter.
 

Detailed Description

Used for document signing.

Standard routine for message signing is Initialize, (single or multiple) Update, Final.

See also
DocumentSignatureSettingsHandle
Examples:
sign.c, and sign_custom.c.

Member Typedef Documentation

◆ SigningKey_Initialize_Function

typedef error_type(* SigningKey_Initialize_Function) (void *user_data, MessageDigestAlgorithmType algorithm)

Initialize signing engine using selected digest algorithm.

This function should reset all previous settings and prepare for future SigningKey_Update_Function to be called.

Friends And Related Function Documentation

◆ SigningKey_Update_Function

typedef error_type(* SigningKey_Update_Function) (void *user_data, const BufferHandle *data)
related

Insert data into engine for digest calculation.

This function can be called multiple times, if there are more data for signing that would fit in a single buffer.

◆ SigningKey_Final_Function

typedef error_type(* SigningKey_Final_Function) (void *user_data, BufferHandle **result)
related

Finish the digest calculation and return signed hash.

This function should allocate buffer, filled with data. The data should be hash value according to algorithm in SigningKey_Initialize_Function.

Hash should be signed and the result should be either a DER-encoded PKCS#1 binary data object or a DER-encoded PKCS#7 binary data object.

◆ SigningKey_Cleanup_Function

typedef void(* SigningKey_Cleanup_Function) (void *user_data)
related

Cleanup all dependencies after the signing process has finished.

This function is called when the last reference to the SigningKeyHandle has been disposed.

◆ SigningKey_Release()

error_type SigningKey_Release ( SigningKeyHandle handle)
related

Decrement the internal reference counter.

When the internal counter reaches zero the object is deleted. Releasing already disposed object causes undefined behavior.

See also
IUnknown_Release
Examples:
sign.c, and sign_custom.c.

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