3 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
5 * ntlm structs are taken from NTLM description on
6 * http://www.innovation.ch/java/ntlm.html
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #ifndef _PURPLE_NTLM_H
24 #define _PURPLE_NTLM_H
27 * @section_id: libpurple-ntlm
28 * @short_description: <filename>ntlm.h</filename>
29 * @title: NTLM Authentication
35 * purple_ntlm_gen_type1:
36 * @hostname: Your hostname
37 * @domain: The domain to authenticate to
39 * Generates the base64 encoded type 1 message needed for NTLM authentication
41 * Returns: base64 encoded string to send to the server. This should
42 * be g_free'd by the caller.
44 gchar
*purple_ntlm_gen_type1(const gchar
*hostname
, const gchar
*domain
);
47 * purple_ntlm_parse_type2:
48 * @type2: String containing the base64 encoded type2 message
49 * @flags: If not %NULL, this will store the flags for the message
51 * Parses the ntlm type 2 message
53 * Returns: The nonce for use in message type3. This is a statically
54 * allocated 8 byte binary string.
56 guint8
*purple_ntlm_parse_type2(const gchar
*type2
, guint32
*flags
);
59 * purple_ntlm_gen_type3:
60 * @username: The username
61 * @passw: The password
62 * @hostname: The hostname
63 * @domain: The domain to authenticate against
64 * @nonce: The nonce returned by purple_ntlm_parse_type2
65 * @flags: Pointer to the flags returned by purple_ntlm_parse_type2
67 * Generates a type3 message
69 * Returns: A base64 encoded type3 message. This should be g_free'd by
72 gchar
*purple_ntlm_gen_type3(const gchar
*username
, const gchar
*passw
, const gchar
*hostname
, const gchar
*domain
, const guint8
*nonce
, guint32
*flags
);
76 #endif /* _PURPLE_NTLM_H */