diff libpurple/protocols/jabber/jutil.h @ 29099:464d022d7d6e

jabber: Add SASLprep and the username substitution called for in draft-ietf-sasl-scram-10 5.1. The non-libidn code has not been tested.
author Paul Aurich <paul@darkrain42.org>
date Mon, 30 Nov 2009 20:34:54 +0000
parents 2e3678cd33a0
children d558d141aaae
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jutil.h	Mon Nov 30 02:44:03 2009 +0000
+++ b/libpurple/protocols/jabber/jutil.h	Mon Nov 30 20:34:54 2009 +0000
@@ -51,6 +51,15 @@
 gboolean jabber_domain_validate(const char *);
 gboolean jabber_resourceprep_validate(const char *);
 
+/**
+ * Apply the SASLprep profile of stringprep to the string passed in.
+ *
+ * @returns A newly allocated string containing the normalized version
+ *          of the input, or NULL if an error occurred (the string could
+ *          not be normalized)
+ */
+char *jabber_saslprep(const char *);
+
 PurpleConversation *jabber_find_unnormalized_conv(const char *name, PurpleAccount *account);
 
 char *jabber_calculate_data_sha1sum(gconstpointer data, size_t len);