Vanilla.PDF  1.5.2
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 
4 #include "vanillapdf/c_export.h"
5 #include "vanillapdf/c_handles.h"
6 #include "vanillapdf/c_values.h"
7 
9 
10 #ifdef __cplusplus
11 extern "C"
12 {
13 #endif
14 
42 
49  typedef error_type (*SigningKey_Update_Function)(void* user_data, const BufferHandle* data);
50 
59  typedef error_type (*SigningKey_Final_Function)(void* user_data, BufferHandle** result);
60 
67  typedef void (*SigningKey_Cleanup_Function)(void* user_data);
68 
72  VANILLAPDF_API error_type CALLING_CONVENTION SigningKey_CreateCustom(
74  SigningKey_Update_Function sign_update,
75  SigningKey_Final_Function sign_final,
76  SigningKey_Cleanup_Function sign_cleanup,
77  void* user_data,
78  SigningKeyHandle** result
79  );
80 
84  VANILLAPDF_API error_type CALLING_CONVENTION SigningKey_ToUnknown(SigningKeyHandle* handle, IUnknownHandle** result);
85 
89  VANILLAPDF_API error_type CALLING_CONVENTION SigningKey_FromUnknown(IUnknownHandle* handle, SigningKeyHandle** result);
90 
95  VANILLAPDF_API error_type CALLING_CONVENTION SigningKey_Release(SigningKeyHandle* handle);
96 
99 #ifdef __cplusplus
100 };
101 #endif
102 
103 #endif /* _C_SIGNING_KEY_H */
error_type(* SigningKey_Final_Function)(void *user_data, BufferHandle **result)
Finish the digest calculation and return signed hash.
Definition: c_signing_key.h:59
error_type SigningKey_Release(SigningKeyHandle *handle)
Decrement the internal reference counter.
Used for document signing.
This file contains all type forward declarations returned by the library API.
error_type SigningKey_FromUnknown(IUnknownHandle *handle, SigningKeyHandle **result)
Convert IUnknownHandle to BufferHandle.
error_type SigningKey_ToUnknown(SigningKeyHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
uint32_t error_type
This is return value type of all API functions.
Definition: c_types.h:25
This file contains macro declarations for importing and exporting symbols from library boundaries...
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_Initialize_Function)(void *user_data, MessageDigestAlgorithmType algorithm)
Initialize signing engine using selected digest algorithm.
Definition: c_signing_key.h:41
This file contains types and constants used as parameters or return values.
Represents memory stored data.
Base class for reference counting.
This file contains all supported digest algorithms.
void(* SigningKey_Cleanup_Function)(void *user_data)
Cleanup all dependencies after the signing process has finished.
Definition: c_signing_key.h:67
MessageDigestAlgorithmType
Supported digest algorithms used as hash functions.
Definition: c_message_digest_algorithm.h:22
error_type(* SigningKey_Update_Function)(void *user_data, const BufferHandle *data)
Insert data into engine for digest calculation.
Definition: c_signing_key.h:49