Leaked source code of windows server 2003
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

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. digest.cxx
  5. Abstract:
  6. This file contains definitions for digest.cxx
  7. Parses http digest challenges and generates http digest
  8. authorization headers for digest sspi package.
  9. Author:
  10. Adriaan Canter (adriaanc) 01-Aug-1998
  11. --*/
  12. #ifndef DIGEST_HXX
  13. #define DIGEST_HXX
  14. #define SIZE_MD5_DIGEST 32
  15. #define AUTH_SZ "auth"
  16. #define AUTH_LEN sizeof(AUTH_SZ) - 1
  17. //--------------------------------------------------------------------
  18. // Class CDigest
  19. // Top level object parses digest challenges and generates response.
  20. //--------------------------------------------------------------------
  21. class CDigest
  22. {
  23. protected:
  24. static VOID ToHex(LPBYTE pSrc, UINT cSrc, LPSTR pDst);
  25. public:
  26. CDigest::CDigest();
  27. static LPSTR MakeCNonce();
  28. static DWORD ParseChallenge(CSess *pSess, PSecBufferDesc pSecBufDesc,
  29. CParams **ppParams, DWORD fContextReq);
  30. static DWORD GenerateResponse(CSess *pSess, CParams *pParams,
  31. CCredInfo *pInfo, PSecBufferDesc pSecBufDesc);
  32. };
  33. #endif // DIGEST_HXX