how to calculate md5 and base64 of a string?

John Bailey rekkanoryo at rekkanoryo.org
Sat Mar 21 12:33:40 EDT 2009


Sulabh Mahajan wrote:
> 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?

You should probably use the yahoo prpl's to_y64 function.  Yahoo uses a
different alphabet in its implementation of base64, which is accounted for in
to_y64().  The docs I've seen for the p16 login show that you would need to
substitute characters in the resultant string if you used a standard base64
encoding function.

John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20090321/e56484bf/attachment.sig>


More information about the Devel mailing list