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.

88 lines
2.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: pstrpc.idl
  8. //
  9. // Description:
  10. //
  11. // This file describes the DPAPI ICryptProtect interface, which
  12. // is a local-only RPC interface used by the CryptProtectData and
  13. // CryptUnprotectData functions. The server-side handlers for this
  14. // interface live in the lsass.exe process.
  15. //
  16. //--------------------------------------------------------------------------
  17. import "unknwn.idl";
  18. import "basetsd.h";
  19. typedef struct _SSCRYPTPROTECTDATA_PROMPTSTRUCT
  20. {
  21. DWORD cbSize;
  22. DWORD dwPromptFlags;
  23. // DWORD_PTR hwndApp;
  24. // LPCWSTR szPrompt;
  25. } SSCRYPTPROTECTDATA_PROMPTSTRUCT, *PSSCRYPTPROTECTDATA_PROMPTSTRUCT;
  26. ////////////////////////////
  27. // Interfaces
  28. [
  29. uuid(11220835-5b26-4d94-ae86-c3e475a809de),
  30. version(1.0),
  31. pointer_default(unique)
  32. ]
  33. interface ICryptProtect
  34. {
  35. DWORD
  36. SSCryptProtectData(
  37. [in] handle_t h,
  38. [out][size_is(,*pcbOut)] BYTE** ppbOut,
  39. [out] DWORD* pcbOut,
  40. [in][size_is(cbIn)] BYTE* pbIn, // in encr data
  41. [in] DWORD cbIn, // in encr cb
  42. [in] LPCWSTR szDataDescr,
  43. [in, unique][size_is(cbOptionalEntropy)]
  44. BYTE* pbOptionalEntropy,
  45. [in] DWORD cbOptionalEntropy,
  46. [in, unique] PSSCRYPTPROTECTDATA_PROMPTSTRUCT pPromptStruct,
  47. [in] DWORD dwFlags,
  48. [in, unique][size_is(cbOptionalPassword)]
  49. BYTE* pbOptionalPassword,
  50. [in] DWORD cbOptionalPassword
  51. );
  52. DWORD
  53. SSCryptUnprotectData(
  54. [in] handle_t h,
  55. [out][size_is(,*pcbOut)] BYTE** ppbOut,
  56. [out] DWORD* pcbOut,
  57. [in][size_is(cbIn)] BYTE* pbIn, // in encr data
  58. [in] DWORD cbIn, // in encr cb
  59. [in,out,ptr] LPWSTR* ppszDataDescr,
  60. [in, unique][size_is(cbOptionalEntropy)]
  61. BYTE* pbOptionalEntropy,
  62. [in] DWORD cbOptionalEntropy,
  63. [in, unique] PSSCRYPTPROTECTDATA_PROMPTSTRUCT pPromptStruct,
  64. [in] DWORD dwFlags,
  65. [in, unique][size_is(cbOptionalPassword)]
  66. BYTE* pbOptionalPassword,
  67. [in] DWORD cbOptionalPassword
  68. );
  69. }