Vanilla.PDF  1.4.1
Cross-platform toolkit for creating and modifying PDF documents
c_encryption.h
Go to the documentation of this file.
1 #ifndef _C_ENCRYPTION_H
2 #define _C_ENCRYPTION_H
3 
4 #include "vanillapdf/c_export.h"
5 #include "vanillapdf/c_handles.h"
6 #include "vanillapdf/c_values.h"
7 
8 #ifdef __cplusplus
9 extern "C"
10 {
11 #endif
12 
37  typedef void (*EncryptionKeyInitializeFunction)(void);
38 
45  typedef void (*EncryptionKeyCleanupFunction)(void);
46 
55 
62  typedef error_type (*EncryptionKeyContainsFunction)(const BufferHandle* issuer, const BufferHandle* serial, boolean_type* result);
63 
67  VANILLAPDF_API error_type CALLING_CONVENTION EncryptionKey_CreateCustom(
72  EncryptionKeyHandle** result
73  );
74 
79  VANILLAPDF_API error_type CALLING_CONVENTION EncryptionKey_Release(EncryptionKeyHandle* handle);
80 
83 #ifdef __cplusplus
84 };
85 #endif
86 
87 #endif /* _C_ENCRYPTION_H */
void(* EncryptionKeyCleanupFunction)(void)
Cleanup all dependencies after the decryption process has finished.
Definition: c_encryption.h:45
error_type EncryptionKey_Release(EncryptionKeyHandle *handle)
Decrement the internal reference counter.
error_type(* EncryptionKeyDecryptFunction)(const BufferHandle *data, BufferHandle **result)
User provided function used for decrypting data.
Definition: c_encryption.h:54
error_type(* EncryptionKeyContainsFunction)(const BufferHandle *issuer, const BufferHandle *serial, boolean_type *result)
Function used to determine whether the private key for certificate issued by issuer with serial is pr...
Definition: c_encryption.h:62
This file contains all type forward declarations returned by the library API.
error_type EncryptionKey_CreateCustom(EncryptionKeyInitializeFunction initialize, EncryptionKeyCleanupFunction cleanup, EncryptionKeyDecryptFunction decrypt, EncryptionKeyContainsFunction contains, EncryptionKeyHandle **result)
Creates a custom EncryptionKeyHandle to provide custom decrypt operation.
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...
Represents encryption key other than password.
void(* EncryptionKeyInitializeFunction)(void)
Function pointer used to initialize dependencies in order to provide decryption.
Definition: c_encryption.h:37
This file contains types and constants used as parameters or return values.
Represents memory stored data.
int8_t boolean_type
Boolean type supported in C.
Definition: c_types.h:31