Frameworks/libpurple.framework/Versions/0.6.2/Headers/ntlm.h
changeset 2592 e8d15275025e
parent 1739 8b0daad9656c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Frameworks/libpurple.framework/Versions/0.6.2/Headers/ntlm.h	Fri Aug 21 13:25:11 2009 -0700
     1.3 @@ -0,0 +1,73 @@
     1.4 +/**
     1.5 + * @file ntlm.h
     1.6 + */
     1.7 +
     1.8 +/* purple
     1.9 + *
    1.10 + * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
    1.11 + *
    1.12 + * ntlm structs are taken from NTLM description on
    1.13 + * http://www.innovation.ch/java/ntlm.html
    1.14 + *
    1.15 + * This program is free software; you can redistribute it and/or modify
    1.16 + * it under the terms of the GNU General Public License as published by
    1.17 + * the Free Software Foundation; either version 2 of the License, or
    1.18 + * (at your option) any later version.
    1.19 + *
    1.20 + * This program is distributed in the hope that it will be useful,
    1.21 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.22 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.23 + * GNU General Public License for more details.
    1.24 + *
    1.25 + * You should have received a copy of the GNU General Public License
    1.26 + * along with this program; if not, write to the Free Software
    1.27 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
    1.28 + */
    1.29 +
    1.30 +#ifndef _PURPLE_NTLM_H
    1.31 +#define _PURPLE_NTLM_H
    1.32 +
    1.33 +#ifdef __cplusplus
    1.34 +extern "C" {
    1.35 +#endif
    1.36 +
    1.37 +/**
    1.38 + * Generates the base64 encoded type 1 message needed for NTLM authentication
    1.39 + *
    1.40 + * @param hostname Your hostname
    1.41 + * @param domain The domain to authenticate to
    1.42 + * @return base64 encoded string to send to the server.  This should
    1.43 + *         be g_free'd by the caller.
    1.44 + */
    1.45 +gchar *purple_ntlm_gen_type1(const gchar *hostname, const gchar *domain);
    1.46 +
    1.47 +/**
    1.48 + * Parses the ntlm type 2 message
    1.49 + *
    1.50 + * @param type2 String containing the base64 encoded type2 message
    1.51 + * @param flags If not @c NULL, this will store the flags for the message
    1.52 + *
    1.53 + * @return The nonce for use in message type3.  This is a statically
    1.54 + *         allocated 8 byte binary string.
    1.55 + */
    1.56 +guint8 *purple_ntlm_parse_type2(const gchar *type2, guint32 *flags);
    1.57 +
    1.58 +/**
    1.59 + * Generates a type3 message
    1.60 + *
    1.61 + * @param username The username
    1.62 + * @param passw The password
    1.63 + * @param hostname The hostname
    1.64 + * @param domain The domain to authenticate against
    1.65 + * @param nonce The nonce returned by purple_ntlm_parse_type2
    1.66 + * @param flags Pointer to the flags returned by purple_ntlm_parse_type2
    1.67 + * @return A base64 encoded type3 message.  This should be g_free'd by
    1.68 + *         the caller.
    1.69 + */
    1.70 +gchar *purple_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags);
    1.71 +
    1.72 +#ifdef __cplusplus
    1.73 +}
    1.74 +#endif
    1.75 +
    1.76 +#endif /* _PURPLE_NTLM_H */