~ubuntu-branches/ubuntu/quantal/linphone/quantal

« back to all changes in this revision

Viewing changes to osipua/src/digcalc.h

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2006-11-15 10:34:50 UTC
  • mfrom: (1.2.1 upstream) (2.1.8 feisty)
  • Revision ID: james.westby@ubuntu.com-20061115103450-qgafwcks2lkhctlj
* New upstream release.
* Enable video support.
* Fix mismatched #endif in mscommon.h, closes: #398307.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/* TAKEN from rcf2617.txt */
3
 
 
4
 
#ifndef _DIGCALC_H_
5
 
#define _DIGCALC_H_
6
 
 
7
 
#define HASHLEN 16
8
 
typedef char HASH[HASHLEN];
9
 
#define HASHHEXLEN 32
10
 
typedef char HASHHEX[HASHHEXLEN+1];
11
 
#define IN
12
 
#define OUT
13
 
 
14
 
/* calculate H(A1) as per HTTP Digest spec */
15
 
void DigestCalcHA1(
16
 
    IN char * pszAlg,
17
 
    IN char * pszUserName,
18
 
    IN char * pszRealm,
19
 
    IN char * pszPassword,
20
 
    IN char * pszNonce,
21
 
    IN char * pszCNonce,
22
 
    OUT HASHHEX SessionKey
23
 
    );
24
 
 
25
 
/* calculate request-digest/response-digest as per HTTP Digest spec */
26
 
void DigestCalcResponse(
27
 
    IN HASHHEX HA1,           /* H(A1) */
28
 
    IN char * pszNonce,       /* nonce from server */
29
 
    IN char * pszNonceCount,  /* 8 hex digits */
30
 
    IN char * pszCNonce,      /* client nonce */
31
 
    IN char * pszQop,         /* qop-value: "", "auth", "auth-int" */
32
 
    IN char * pszMethod,      /* method from the request */
33
 
    IN char * pszDigestUri,   /* requested URL */
34
 
    IN HASHHEX HEntity,       /* H(entity body) if qop="auth-int" */
35
 
    OUT HASHHEX Response      /* request-digest or response-digest */
36
 
    );
37
 
 
38
 
 
39
 
 
40
 
#endif