| 1132 * @return A newly allocated ASCIIZ string. |
1132 * @return A newly allocated ASCIIZ string. |
| 1133 */ |
1133 */ |
| 1134 char *purple_str_binary_to_ascii(const unsigned char *binary, guint len); |
1134 char *purple_str_binary_to_ascii(const unsigned char *binary, guint len); |
| 1135 |
1135 |
| 1136 /** |
1136 /** |
| |
1137 * Calculates UTF-16 string size (in bytes). |
| |
1138 * |
| |
1139 * @param str String to check. |
| |
1140 * @return Number of bytes (including NUL character) that string occupies. |
| |
1141 */ |
| |
1142 size_t purple_utf16_size(const gunichar2 *str); |
| |
1143 |
| |
1144 /** |
| 1137 * Fills a NUL-terminated string with zeros and frees it. |
1145 * Fills a NUL-terminated string with zeros and frees it. |
| 1138 * |
1146 * |
| 1139 * It should be used to free sensitive data, like passwords. |
1147 * It should be used to free sensitive data, like passwords. |
| 1140 * |
1148 * |
| 1141 * @param str A NUL-terminated string to free, or a NULL-pointer. |
1149 * @param str A NUL-terminated string to free, or a NULL-pointer. |
| 1142 */ |
1150 */ |
| 1143 void purple_str_wipe(gchar *str); |
1151 void purple_str_wipe(gchar *str); |
| |
1152 |
| |
1153 /** |
| |
1154 * Fills a NUL-terminated UTF-16 string with zeros and frees it. |
| |
1155 * |
| |
1156 * It should be used to free sensitive data, like passwords. |
| |
1157 * |
| |
1158 * @param str A NUL-terminated string to free, or a NULL-pointer. |
| |
1159 */ |
| |
1160 void purple_utf16_wipe(gunichar2 *str); |
| |
1161 |
| 1144 /*@}*/ |
1162 /*@}*/ |
| 1145 |
1163 |
| 1146 |
1164 |
| 1147 /**************************************************************************/ |
1165 /**************************************************************************/ |
| 1148 /** @name URI/URL Functions */ |
1166 /** @name URI/URL Functions */ |