how can I convert a GpgmeData to a char ?

Werner Koch wk@gnupg.org
Tue Mar 26 14:58:02 2002


On Tue, 26 Mar 2002 11:12:44 +0100, Fabien Pochon said:

> how can I convert a GpgmeData to a char ?

I don't understand this.  GpgmeData is an object to store large
amounts of data, you probably can't squeeze it into 8 bits.

Maybe you want this.  
char gpgme_data_release_and_get_mem (GpgmeData dh, size_t *r_len)

 Release the data object DH and return its content and the length
 of that content.  The caller has to free this data.  DH maybe NULL
 in which case NULL is returned.  If there is not enough memory for
 allocating the return value, NULL is returned but the object is
 still released.

If you want's to keep the object you have to use the rewind and read
functions.

  Werner