Vanilla.PDF  1.5.2
Cross-platform toolkit for creating and modifying PDF documents
List of all members
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. More...
 
typedef void(* EncryptionKeyCleanupFunction) (void)
 Cleanup all dependencies after the decryption process has finished. More...
 
typedef error_type(* EncryptionKeyDecryptFunction) (const BufferHandle *data, BufferHandle **result)
 User provided function used for decrypting data. More...
 
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. More...
 
error_type EncryptionKey_CreateCustom (EncryptionKeyInitializeFunction initialize, EncryptionKeyCleanupFunction cleanup, EncryptionKeyDecryptFunction decrypt, EncryptionKeyContainsFunction contains, EncryptionKeyHandle **result)
 Creates a custom EncryptionKeyHandle to provide custom decrypt operation.
 
error_type EncryptionKey_Release (EncryptionKeyHandle *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

Represents encryption key other than password.

Examples:
decrypt.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 Function 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 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
Examples:
decrypt.c.

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