Vanilla.PDF  1.6.0
Cross-platform toolkit for creating and modifying PDF documents
c_signing_key.h
Go to the documentation of this file.
1#ifndef _C_SIGNING_KEY_H
2#define _C_SIGNING_KEY_H
3
7
9
10#ifdef __cplusplus
11extern "C"
12{
13#endif
14
41 typedef error_type (CALLING_CONVENTION *SigningKey_Initialize_Function)(void* user_data, MessageDigestAlgorithmType algorithm);
42
49 typedef error_type (CALLING_CONVENTION *SigningKey_Update_Function)(void* user_data, const BufferHandle* data);
50
59 typedef error_type (CALLING_CONVENTION *SigningKey_Final_Function)(void* user_data, BufferHandle** result);
60
66 typedef error_type (CALLING_CONVENTION *SigningKey_Cleanup_Function)(void* user_data);
67
71 VANILLAPDF_API error_type CALLING_CONVENTION SigningKey_CreateCustom(
75 SigningKey_Cleanup_Function sign_cleanup,
76 void* user_data,
77 SigningKeyHandle** result
78 );
79
83 VANILLAPDF_API error_type CALLING_CONVENTION SigningKey_ToUnknown(SigningKeyHandle* handle, IUnknownHandle** result);
84
88 VANILLAPDF_API error_type CALLING_CONVENTION SigningKey_FromUnknown(IUnknownHandle* handle, SigningKeyHandle** result);
89
94 VANILLAPDF_API error_type CALLING_CONVENTION SigningKey_Release(SigningKeyHandle* handle);
95
98#ifdef __cplusplus
99};
100#endif
101
102#endif /* _C_SIGNING_KEY_H */
This file contains macro declarations for importing and exporting symbols from library boundaries.
This file contains all type forward declarations returned by the library API.
This file contains all supported digest algorithms.
This file contains types and constants used as parameters or return values.
Represents memory stored data.
Base class for reference counting.
Used for document signing.
error_type(CALLING_CONVENTION * SigningKey_Initialize_Function)(void *user_data, MessageDigestAlgorithmType algorithm)
Initialize signing engine using selected digest algorithm.
Definition: c_signing_key.h:41
error_type CALLING_CONVENTION SigningKey_FromUnknown(IUnknownHandle *handle, SigningKeyHandle **result)
Convert IUnknownHandle to BufferHandle.
error_type(CALLING_CONVENTION * SigningKey_Update_Function)(void *user_data, const BufferHandle *data)
Insert data into engine for digest calculation.
Definition: c_signing_key.h:49
error_type(CALLING_CONVENTION * SigningKey_Cleanup_Function)(void *user_data)
Cleanup all dependencies after the signing process has finished.
Definition: c_signing_key.h:66
error_type CALLING_CONVENTION 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 CALLING_CONVENTION SigningKey_ToUnknown(SigningKeyHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
error_type CALLING_CONVENTION SigningKey_Release(SigningKeyHandle *handle)
Decrement the internal reference counter.
error_type(CALLING_CONVENTION * SigningKey_Final_Function)(void *user_data, BufferHandle **result)
Finish the digest calculation and return signed hash.
Definition: c_signing_key.h:59
uint32_t error_type
This is return value type of all API functions.
Definition: c_types.h:25
MessageDigestAlgorithmType
Supported digest algorithms used as hash functions.
Definition: c_message_digest_algorithm.h:22