how to calculate md5 and base64 of a string?

Sulabh Mahajan at
Sat Mar 21 07:04:20 EDT 2009

Hello everyone,

I am coding the yahoo ver 16 login process. When nearly about to finish, I
realize I don't know how to calculate md5 of a given string using
libpurple's api. Tried to read the ver 15 login code related to finding md5,
but thats too complex, intermixed with a lot of stuff not needed for the new

I looked at cipher.h, that too passed over my head. I was hoping to find
some function that would be as easy as say md5(string);
Help me here, how do I calculate md5 of a string.

Also, there is a function in yahoo prpl "to_y64()" that is supposed to
convert a string to base64, there is a comment regarding it:

/* This is taken from Sylpheed by Hiroyuki Yamamoto.  We have our own
tobase64 function
 * in util.c, but it has a bug I don't feel like finding right now ;) */

What is the history of this thing? Is our base64 function still having that
bug? Should I use this function to calculate base64 or our own function?

Thanking you,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Devel mailing list