comparison 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
comparison
equal deleted inserted replaced
13697:89ceef5203ac 13698:6bee2e80e42c
1 /** 1 /**
2 * @file ntlm.h 2 * @file ntlm.h
3 * 3 *
4 * gaim 4 * gaim
5 * 5 *
6 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de> 6 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
7 * 7 *
8 * ntlm structs are taken from NTLM description on 8 * ntlm structs are taken from NTLM description on
9 * http://www.innovation.ch/java/ntlm.html 9 * http://www.innovation.ch/java/ntlm.html
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by 12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or 13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version. 14 * (at your option) any later version.
15 * 15 *
29 /** 29 /**
30 * Generates the base64 encoded type 1 message needed for NTLM authentication 30 * Generates the base64 encoded type 1 message needed for NTLM authentication
31 * 31 *
32 * @param hostname Your hostname 32 * @param hostname Your hostname
33 * @param domain The domain to authenticate to 33 * @param domain The domain to authenticate to
34 * @return base64 encoded string to send to the server. has to be freed with g_free 34 * @return base64 encoded string to send to the server. This should
35 * be g_free'd by the caller.
35 */ 36 */
36 gchar *gaim_ntlm_gen_type1(const gchar *hostname, const gchar *domain); 37 gchar *gaim_ntlm_gen_type1(const gchar *hostname, const gchar *domain);
37 38
38 /** 39 /**
39 * Parses the ntlm type 2 message 40 * Parses the ntlm type 2 message
40 * 41 *
41 * @param type2 String containing the base64 encoded type2 message 42 * @param type2 String containing the base64 encoded type2 message
42 * @return The nonce for use in message type3 43 * @return The nonce for use in message type3. This is a statically
44 * allocated 8 byte binary string.
43 */ 45 */
44 gchar *gaim_ntlm_parse_type2(const gchar *type2, guint32 *flags); 46 guint8 *gaim_ntlm_parse_type2(const gchar *type2, guint32 *flags);
45 47
46 /** 48 /**
47 * Generates a type3 message 49 * Generates a type3 message
48 * 50 *
49 * @param username The username 51 * @param username The username
50 * @param passw The password 52 * @param passw The password
51 * @param hostname The hostname 53 * @param hostname The hostname
52 * @param domain The domain to authenticate against 54 * @param domain The domain to authenticate against
53 * @param nonce The nonce returned by gaim_ntlm_parse_type2 55 * @param nonce The nonce returned by gaim_ntlm_parse_type2
54 * @param flags Pointer to the flags returned by gaim_ntlm_parse_type2 56 * @param flags Pointer to the flags returned by gaim_ntlm_parse_type2
55 * @return A base64 encoded type3 message 57 * @return A base64 encoded type3 message. This should be g_free'd by
58 * the caller.
56 */ 59 */
57 gchar *gaim_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, gchar *nonce, guint32 *flags); 60 gchar *gaim_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags);
58 61
59 #endif /* _GAIM_NTLM_H */ 62 #endif /* _GAIM_NTLM_H */