Mercurial > pidgin
comparison src/cipher.h @ 12382:cfc808463763
[gaim-migrate @ 14688]
Reimplement HTTP Digest Authentication (RFC 2617) as part of the Cipher API
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 07 Dec 2005 04:50:36 +0000 |
parents | fc464a0abccc |
children | 4e045668b9d0 |
comparison
equal
deleted
inserted
replaced
12381:29e237c4141b | 12382:cfc808463763 |
---|---|
384 * | 384 * |
385 * @return The cipher data | 385 * @return The cipher data |
386 */ | 386 */ |
387 gpointer gaim_cipher_context_get_data(GaimCipherContext *context); | 387 gpointer gaim_cipher_context_get_data(GaimCipherContext *context); |
388 | 388 |
389 /** | |
390 * Calculates a session key for HTTP Digest authentation | |
391 * | |
392 * See RFC 2617 for more information. | |
393 * | |
394 * @param algorithm The hash algorithm to use | |
395 * @param username The username provided by the user | |
396 * @param realm The authentication realm provided by the server | |
397 * @param password The password provided by the user | |
398 * @param nonce The nonce provided by the server | |
399 * @param client_nonce The nonce provided by the client | |
400 * | |
401 * @return The session key, or @c NULL if an error occurred. | |
402 */ | |
403 gchar *gaim_cipher_http_digest_calculate_session_key( | |
404 const gchar *algorithm, const gchar *username, | |
405 const gchar *realm, const gchar *password, | |
406 const gchar *nonce, const gchar *client_nonce); | |
407 | |
408 /** Calculate a response for HTTP Digest authentication | |
409 * | |
410 * See RFC 2617 for more information. | |
411 * | |
412 * @param algorithm The hash algorithm to use | |
413 * @param method The HTTP method in use | |
414 * @param digest_uri The URI from the initial request | |
415 * @param qop The "quality of protection" | |
416 * @param hashed_entity The hashed entity body | |
417 * @param hashed_entity_len The length of the data in @a hashed_entity | |
418 * @param nonce The nonce provided by the server | |
419 * @param nonce_count The nonce count | |
420 * @param client_nonce The nonce provided by the client | |
421 * @param session_key The session key from gaim_cipher_http_digest_calculate_session_key() | |
422 * | |
423 * @return The hashed response, or @c NULL if an error occurred. | |
424 */ | |
425 gchar *gaim_cipher_http_digest_calculate_response( | |
426 const gchar *algorithm, const gchar *method, | |
427 const gchar *digest_uri, const gchar *qop, | |
428 const gchar *hashed_entity, size_t hashed_entity_len, | |
429 const gchar *nonce, const gchar *nonce_count, | |
430 const gchar *client_nonce, const gchar *session_key); | |
431 | |
389 /*@}*/ | 432 /*@}*/ |
390 | 433 |
391 #ifdef __cplusplus | 434 #ifdef __cplusplus |
392 } | 435 } |
393 #endif /* __cplusplus */ | 436 #endif /* __cplusplus */ |