diff libpurple/util.h @ 17412:ba768014f91f

- Add purple_base16_encode_chunked, which is handy for key fingerprints.
author William Ehlhardt <williamehlhardt@gmail.com>
date Fri, 25 May 2007 20:52:31 +0000
parents b8b2e35ec7c6
children c588a4a9d287
line wrap: on
line diff
--- a/libpurple/util.h	Fri May 25 19:05:47 2007 +0000
+++ b/libpurple/util.h	Fri May 25 20:52:31 2007 +0000
@@ -118,6 +118,21 @@
  */
 guchar *purple_base16_decode(const char *str, gsize *ret_len);
 
+/**
+ * Converts a chunk of binary data to a chunked base-16 representation
+ * (handy for key fingerprints)
+ *
+ * Example output: 01:23:45:67:89:AB:CD:EF
+ *
+ * @param data The data to convert.
+ * @param len  The length of the data.
+ *
+ * @return The base-16 string in the ASCII chunked encoding.  Must be
+ *         g_free'd when no longer needed.
+ */
+gchar *purple_base16_encode_chunked(const guchar *data, gsize len);
+
+
 /*@}*/
 
 /**************************************************************************/