Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GByteArray* to char*

Status
Not open for further replies.

joshshamir

Technical User
Aug 1, 2008
3
Hi,

could someone give me a code snippet of a function that takes a GByteArray (glib.h) as input and returns a char* buffer as output

char* convert(GByteArray* b, int* offset);

I need to pass the buffer obtained above to the

int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);

function

Thank you
 
Thank you,
int* offset is a pointer to int used to store the number of bytes that were already read in the GbyteArray.
This pointer indicates the exact point in the GbyteArray from which the conversion function (GByteArray to char*) can start to read.
 
I want to add that I've tested your function but always return an empty string.

Any idea?

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top