Vanilla.PDF  2.0.0
Cross-platform toolkit for creating and modifying PDF documents
EncryptionKeyHandle Class Reference

Represents encryption key other than password. More...

Inheritance diagram for EncryptionKeyHandle:
IUnknownHandle PKCS12KeyHandle
typedef void(* EncryptionKeyInitializeFunction) (void)
 Function pointer used to initialize dependencies in order to provide decryption.
 
typedef void(* EncryptionKeyCleanupFunction) (void)
 Cleanup all dependencies after the decryption process has finished.
 
typedef error_type(* EncryptionKeyDecryptFunction) (const BufferHandle *data, BufferHandle **result)
 User provided function used for decrypting data.
 
typedef 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 present.
 
error_type CALLING_CONVENTION EncryptionKey_CreateCustom (EncryptionKeyInitializeFunction initialize, EncryptionKeyCleanupFunction cleanup, EncryptionKeyDecryptFunction decrypt, EncryptionKeyContainsFunction contains, EncryptionKeyHandle **result)
 Creates a custom EncryptionKeyHandle to provide custom decrypt operation.
 
error_type CALLING_CONVENTION EncryptionKey_Release (EncryptionKeyHandle *handle)
 Decrement the internal reference counter.
 

Additional Inherited Members

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

Detailed Description

Represents encryption key other than password.

Examples
decrypt.c, and main.c.

Member Typedef Documentation

◆ EncryptionKeyInitializeFunction

typedef void(* EncryptionKeyInitializeFunction) (void)

Function pointer used to initialize dependencies in order to provide decryption.

This function currently cannot fail. In order to indicate failure on initialization return error code in the decrypt function itself.

See also
EncryptionKeyDecryptFunction

Friends And Related Symbol Documentation

◆ EncryptionKeyCleanupFunction

typedef void(* EncryptionKeyCleanupFunction) (void)
related

Cleanup all dependencies after the decryption process has finished.

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

◆ EncryptionKeyDecryptFunction

typedef error_type(* EncryptionKeyDecryptFunction) (const BufferHandle *data, BufferHandle **result)
related

User provided function used for decrypting data.

This function is only called when EncryptionKeyContainsFunction sets the result to true.

Parameters
dataa pointer to source buffer containing the PKCS#7 encrypted data
resultan output pointer which has to be set with the decrypted data on success. Otherwise leave unchanged.

◆ EncryptionKeyContainsFunction

typedef error_type(* EncryptionKeyContainsFunction) (const BufferHandle *issuer, const BufferHandle *serial, boolean_type *result)
related

Function used to determine whether the private key for certificate issued by issuer with serial is present.

Parameters
issuera pointer to X509 NAME structure containning the certificate issuer
issuera pointer to ASN.1 structure containning the certificate serial
resulta pointer to boolean. Set to true, if the private key for issuer and serial is present. Otherwise set to false.

◆ EncryptionKey_Release()

error_type CALLING_CONVENTION EncryptionKey_Release ( EncryptionKeyHandle * 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

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