Make return clearer
[pidgin-git.git] / libpurple / protocols / simple / http.h
blob36c8ef9ef16fadaf48c571cda19cc8be29845da9
1 /* purple
3 * Purple is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #ifndef SIMPLE_HTTP_H
24 #define SIMPLE_HTTP_H
26 #include <glib.h>
28 G_BEGIN_DECLS
30 /**
31 * simple_http_digest_calculate_session_key:
32 * @username: The username provided by the user
33 * @realm: The authentication realm provided by the server
34 * @password: The password provided by the user
35 * @nonce: The nonce provided by the server
36 * @client_nonce: The nonce provided by the client
38 * Calculates a session key for HTTP Digest authentation
40 * See RFC 2617 for more information.
42 * Returns: The session key, or %NULL if an error occurred.
44 gchar *simple_http_digest_calculate_session_key(const gchar *username,
45 const gchar *realm,
46 const gchar *password,
47 const gchar *nonce);
49 /**
50 * simple_http_digest_calculate_response:
51 * @method: The HTTP method in use
52 * @digest_uri: The URI from the initial request
53 * @nonce: The nonce provided by the server
54 * @nonce_count: The nonce count
55 * @session_key: The session key from simple_http_digest_calculate_session_key()
57 * Calculate a response for HTTP Digest authentication
59 * See RFC 2617 for more information.
61 * Returns: The hashed response, or %NULL if an error occurred.
63 gchar *simple_http_digest_calculate_response(const gchar *method,
64 const gchar *digest_uri,
65 const gchar *nonce,
66 const gchar *nonce_count,
67 const gchar *session_key);
69 G_END_DECLS
71 #endif /* SIMPLE_HTTP_H */