mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.1 KiB
52 lines
1.1 KiB
/*++
|
|
|
|
Copyright (c) 1998 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
digest.cxx
|
|
|
|
Abstract:
|
|
|
|
This file contains definitions for digest.cxx
|
|
Parses http digest challenges and generates http digest
|
|
authorization headers for digest sspi package.
|
|
|
|
Author:
|
|
|
|
Adriaan Canter (adriaanc) 01-Aug-1998
|
|
|
|
--*/
|
|
#ifndef DIGEST_HXX
|
|
#define DIGEST_HXX
|
|
|
|
#define SIZE_MD5_DIGEST 32
|
|
#define AUTH_SZ "auth"
|
|
#define AUTH_LEN sizeof(AUTH_SZ) - 1
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
// Class CDigest
|
|
// Top level object parses digest challenges and generates response.
|
|
//--------------------------------------------------------------------
|
|
class CDigest
|
|
{
|
|
protected:
|
|
|
|
static VOID ToHex(LPBYTE pSrc, UINT cSrc, LPSTR pDst);
|
|
|
|
public:
|
|
|
|
CDigest::CDigest();
|
|
|
|
static LPSTR MakeCNonce();
|
|
|
|
static DWORD ParseChallenge(CSess *pSess, PSecBufferDesc pSecBufDesc,
|
|
CParams **ppParams, DWORD fContextReq);
|
|
|
|
static DWORD GenerateResponse(CSess *pSess, CParams *pParams,
|
|
CCredInfo *pInfo, PSecBufferDesc pSecBufDesc);
|
|
};
|
|
|
|
|
|
#endif // DIGEST_HXX
|