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.

75 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1996, 1997 Microsoft Corporation
  3. Module Name:
  4. winpw.h
  5. Abstract:
  6. This module contains routines for retrieving and verification of
  7. Windows [NT] password associated with client calling protected storage.
  8. Author:
  9. Scott Field (sfield) 12-Dec-96
  10. --*/
  11. #ifndef __WINPW_H__
  12. #define __WINPW_H__
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. typedef struct {
  17. BYTE HashedUsername[A_SHA_DIGEST_LEN]; // hash of ANSI username, not include terminal NULL
  18. BYTE HashedPassword[A_SHA_DIGEST_LEN]; // hash of Unicode password, not include terminal NULL
  19. BOOL bValid; // indicates if structure contents valid
  20. } WIN95_PASSWORD, *PWIN95_PASSWORD, *LPWIN95_PASSWORD;
  21. BOOL
  22. SetPasswordNT(
  23. PLUID LogonID,
  24. BYTE HashedPassword[A_SHA_DIGEST_LEN]
  25. );
  26. BOOL
  27. GetPasswordNT(
  28. BYTE HashedPassword[A_SHA_DIGEST_LEN]
  29. );
  30. BOOL
  31. GetSpecialCasePasswordNT(
  32. BYTE HashedPassword[A_SHA_DIGEST_LEN], // derived bits when fSpecialCase == TRUE
  33. LPBOOL fSpecialCase // legal special case encountered?
  34. );
  35. BOOL
  36. SetPassword95(
  37. BYTE HashedUsername[A_SHA_DIGEST_LEN],
  38. BYTE HashedPassword[A_SHA_DIGEST_LEN]
  39. );
  40. BOOL
  41. GetPassword95(
  42. BYTE HashedPassword[A_SHA_DIGEST_LEN]
  43. );
  44. BOOL
  45. VerifyWindowsPassword(
  46. LPCWSTR Password // password to validate
  47. );
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif // __WINPW_H__