Previous: , Up: Manipulating Data Buffers   [Contents][Index]

6.3.3 Data Buffer Convenience Functions

Data type: enum gpgme_data_type_t

SINCE: 1.4.3

The gpgme_data_type_t type is used to return the detected type of the content of a data buffer.


This is returned by gpgme_data_identify if it was not possible to identify the data. Reasons for this might be a non-seekable stream or a memory problem. The value is 0.


The type of the data is not known.


The data is an OpenPGP signed message. This may be a binary signature, a detached one or a cleartext signature.


SINCE: 1.7.0

The data is an OpenPGP encrypted message.


SINCE: 1.7.0

The data is an OpenPGP detached signature.


This is a generic OpenPGP message. In most cases this will be encrypted data.


This is an OpenPGP key (private or public).


This is a CMS signed message.


This is a CMS encrypted (enveloped data) message.


This is used for other CMS message types.


The data is a X.509 certificate


The data is a PKCS#12 message. This is commonly used to exchange private keys for X.509.

Function: gpgme_data_type_t gpgme_data_identify (gpgme_data_t dh, int reserved)

SINCE: 1.4.3

The function gpgme_data_identify returns the type of the data with the handle dh. If it is not possible to perform the identification, the function returns zero (GPGME_DATA_TYPE_INVALID). Note that depending on how the data object has been created the identification may not be possible or the data object may change its internal state (file pointer moved). For file or memory based data object, the state should not change. reserved should be zero.

Previous: Data Buffer Meta-Data, Up: Manipulating Data Buffers   [Contents][Index]