Next: , Previous: Error Handling, Up: Top


6 Exchanging Data

A lot of data has to be exchanged between the user and the crypto engine, like plaintext messages, ciphertext, signatures and information about the keys. The technical details about exchanging the data information are completely abstracted by GPGME. The user provides and receives the data via gpgme_data_t objects, regardless of the communication protocol between GPGME and the crypto engine in use.

— Data type: gpgme_data_t

The gpgme_data_t type is a handle for a container for generic data, which is used by GPGME to exchange data with the user.

gpgme_data_t objects do not provide notifications on events. It is assumed that read and write operations are blocking until data is available. If this is undesirable, the application must ensure that all GPGME data operations always have data available, for example by using memory buffers or files rather than pipes or sockets. This might be relevant, for example, if the external event loop mechanism is used.