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.

84 lines
1.9 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // cleartxt.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Declares functions for storing and retrieving cleartext passwords from
  12. // UserParameters.
  13. //
  14. // MODIFICATION HISTORY
  15. //
  16. // 08/31/1998 Original version.
  17. //
  18. ///////////////////////////////////////////////////////////////////////////////
  19. #ifndef _CLEARTXT_H_
  20. #define _CLEARTXT_H_
  21. #if _MSC_VER >= 1000
  22. #pragma once
  23. #endif
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /////////
  28. // Note: These functions return Win32 error codes, not NTSTATUS codes.
  29. /////////
  30. //////////
  31. // Clears the encrypted cleartext password. The new UserParameters must be
  32. // freed through a call to IASParmsUserParmsFree. If the cleartext password
  33. // was not previously set, the function returns NO_ERROR and pszNewUserParms
  34. // is set to NULL.
  35. //////////
  36. DWORD
  37. WINAPI
  38. IASParmsClearUserPassword(
  39. IN PCWSTR szUserParms,
  40. OUT PWSTR *pszNewUserParms
  41. );
  42. //////////
  43. // Retrieves the decrypted cleartext password. The returned password must be
  44. // freed through a call to LocalFree. If the cleartext password is not
  45. // set, the function returns NO_ERROR and pszPassword is set to NULL.
  46. //////////
  47. DWORD
  48. WINAPI
  49. IASParmsGetUserPassword(
  50. IN PCWSTR szUserParms,
  51. OUT PWSTR *pszPassword
  52. );
  53. //////////
  54. // Sets the encrypted cleartext password. The new UserParameters must be
  55. // freed through a call to IASParmsUserParmsFree.
  56. //////////
  57. DWORD
  58. WINAPI
  59. IASParmsSetUserPassword(
  60. IN PCWSTR szUserParms,
  61. IN PCWSTR szPassword,
  62. OUT PWSTR *pszNewUserParms
  63. );
  64. //////////
  65. // Frees a UserParameters string returned by IASParmsClearUserPassword or
  66. // IASParmsSetUserPassword.
  67. //////////
  68. VOID
  69. WINAPI
  70. IASParmsFreeUserParms(
  71. IN LPWSTR szNewUserParms
  72. );
  73. #ifdef __cplusplus
  74. }
  75. #endif
  76. #endif // _CLEARTXT_H_