diff -r 94102637e7c7 -r a23f3228c465 libpurple/util.h --- a/libpurple/util.h Sun Apr 28 15:55:57 2013 +0200 +++ b/libpurple/util.h Mon Apr 29 03:35:54 2013 +0200 @@ -1134,6 +1134,14 @@ char *purple_str_binary_to_ascii(const unsigned char *binary, guint len); /** + * Calculates UTF-16 string size (in bytes). + * + * @param str String to check. + * @return Number of bytes (including NUL character) that string occupies. + */ +size_t purple_utf16_size(const gunichar2 *str); + +/** * Fills a NUL-terminated string with zeros and frees it. * * It should be used to free sensitive data, like passwords. @@ -1141,6 +1149,16 @@ * @param str A NUL-terminated string to free, or a NULL-pointer. */ void purple_str_wipe(gchar *str); + +/** + * Fills a NUL-terminated UTF-16 string with zeros and frees it. + * + * It should be used to free sensitive data, like passwords. + * + * @param str A NUL-terminated string to free, or a NULL-pointer. + */ +void purple_utf16_wipe(gunichar2 *str); + /*@}*/