Mercurial > pidgin.yaz
diff src/ntlm.h @ 13698:6bee2e80e42c
[gaim-migrate @ 16101]
Additional constification, add some comments, remove some
superfluous whitespace, and changed gchar to guint8 in a
few places.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 28 Apr 2006 03:52:09 +0000 |
parents | 2e0d8828da51 |
children | a539caf502b0 |
line wrap: on
line diff
--- a/src/ntlm.h Fri Apr 28 03:39:14 2006 +0000 +++ b/src/ntlm.h Fri Apr 28 03:52:09 2006 +0000 @@ -1,13 +1,13 @@ /** * @file ntlm.h - * + * * gaim * * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de> * - * ntlm structs are taken from NTLM description on - * http://www.innovation.ch/java/ntlm.html - * + * ntlm structs are taken from NTLM description on + * http://www.innovation.ch/java/ntlm.html + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -31,7 +31,8 @@ * * @param hostname Your hostname * @param domain The domain to authenticate to - * @return base64 encoded string to send to the server. has to be freed with g_free + * @return base64 encoded string to send to the server. This should + * be g_free'd by the caller. */ gchar *gaim_ntlm_gen_type1(const gchar *hostname, const gchar *domain); @@ -39,9 +40,10 @@ * Parses the ntlm type 2 message * * @param type2 String containing the base64 encoded type2 message - * @return The nonce for use in message type3 + * @return The nonce for use in message type3. This is a statically + * allocated 8 byte binary string. */ -gchar *gaim_ntlm_parse_type2(const gchar *type2, guint32 *flags); +guint8 *gaim_ntlm_parse_type2(const gchar *type2, guint32 *flags); /** * Generates a type3 message @@ -52,8 +54,9 @@ * @param domain The domain to authenticate against * @param nonce The nonce returned by gaim_ntlm_parse_type2 * @param flags Pointer to the flags returned by gaim_ntlm_parse_type2 - * @return A base64 encoded type3 message + * @return A base64 encoded type3 message. This should be g_free'd by + * the caller. */ -gchar *gaim_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, gchar *nonce, guint32 *flags); +gchar *gaim_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags); #endif /* _GAIM_NTLM_H */