1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2000-2003, Ximian, Inc.
6 #ifndef SOUP_AUTH_DIGEST_H
7 #define SOUP_AUTH_DIGEST_H 1
11 #define SOUP_AUTH_DIGEST(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_AUTH_DIGEST, SoupAuthDigest))
12 #define SOUP_AUTH_DIGEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH_DIGEST, SoupAuthDigestClass))
13 #define SOUP_IS_AUTH_DIGEST(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SOUP_TYPE_AUTH_DIGEST))
14 #define SOUP_IS_AUTH_DIGEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOUP_TYPE_AUTH_DIGEST))
15 #define SOUP_AUTH_DIGEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_AUTH_DIGEST, SoupAuthDigestClass))
23 SoupAuthClass parent_class;
25 } SoupAuthDigestClass;
27 /* Utility routines (also used by SoupAuthDomainDigest) */
30 SOUP_AUTH_DIGEST_ALGORITHM_NONE,
31 SOUP_AUTH_DIGEST_ALGORITHM_MD5,
32 SOUP_AUTH_DIGEST_ALGORITHM_MD5_SESS
33 } SoupAuthDigestAlgorithm;
36 SOUP_AUTH_DIGEST_QOP_AUTH = 1 << 0,
37 SOUP_AUTH_DIGEST_QOP_AUTH_INT = 1 << 1
40 SoupAuthDigestAlgorithm soup_auth_digest_parse_algorithm (const char *algorithm);
41 char *soup_auth_digest_get_algorithm (SoupAuthDigestAlgorithm algorithm);
43 SoupAuthDigestQop soup_auth_digest_parse_qop (const char *qop);
44 char *soup_auth_digest_get_qop (SoupAuthDigestQop qop);
46 void soup_auth_digest_compute_hex_urp (const char *username,
50 void soup_auth_digest_compute_hex_a1 (const char *hex_urp,
51 SoupAuthDigestAlgorithm algorithm,
55 void soup_auth_digest_compute_response (const char *method,
58 SoupAuthDigestQop qop,
64 #endif /*SOUP_AUTH_DIGEST_H*/