comparison src/ntlm.h @ 11375:7e98b3bf2fdf

[gaim-migrate @ 13601] ntlm api committer: Tailor Script <tailor@pidgin.im>
author Thomas Butter <tbutter>
date Tue, 30 Aug 2005 18:22:28 +0000
parents
children 31a3a9af1494
comparison
equal deleted inserted replaced
11374:6d3d44c60a86 11375:7e98b3bf2fdf
1 /**
2 * @file ntlm.h
3 *
4 * gaim
5 *
6 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
7 *
8 * ntlm structs are taken from NTLM description on
9 * http://www.innovation.ch/java/ntlm.html
10 *
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
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26 #ifndef _GAIM_NTLM_H
27 #define _GAIM_NTLM_H
28
29 /**
30 * Generates the base64 encoded type 1 message needed for NTLM authentication
31 *
32 * @param hostname Your hostname
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
35 */
36 gchar *gaim_ntlm_gen_type1(gchar *hostname, gchar *domain);
37
38 /**
39 * Parses the ntlm type 2 message
40 *
41 * @param type2 String containing the base64 encoded type2 message
42 * @return The nonce for use in message type3
43 */
44 gchar *gaim_ntlm_parse_type2(gchar *type2);
45
46 /**
47 * Generates a type3 message
48 *
49 * @param username The username
50 * @param passw The password
51 * @param hostname The hostname
52 * @param domain The domain to authenticate against
53 * @param nonce The nonce returned by gaim_ntlm_parse_type2
54 * @return A base64 encoded type3 message
55 */
56 gchar *gaim_ntlm_gen_type3(gchar *username, gchar *passw, gchar *hostname, gchar *domain, gchar *nonce);
57
58 #endif /* _GAIM_NTLM_H */