Source code of Windows XP (NT5)
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.

59 lines
2.2 KiB

  1. // AuxContext.h -- Auxiliary Provider Context wrapper functor header to
  2. // manage allocation of a context to one of the Microsoft CSPs (for
  3. // use as a supplemental CSP).
  4. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  5. // 1999. This computer program includes Confidential, Proprietary
  6. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  7. // use, disclosure, and/or reproduction is prohibited unless authorized
  8. // in writing. All Rights Reserved.
  9. #if !defined(SLBCSP_AUXCONTEXT_H)
  10. #define SLBCSP_AUXCONTEXT_H
  11. #include <windows.h>
  12. #include <wincrypt.h>
  13. class AuxContext
  14. {
  15. public:
  16. // Types
  17. // C'tors/D'tors
  18. explicit
  19. AuxContext();
  20. AuxContext(HCRYPTPROV hcryptprov,
  21. bool fTransferOwnership = false);
  22. ~AuxContext();
  23. // Operators
  24. HCRYPTPROV
  25. operator()() const;
  26. // Operations
  27. // Access
  28. // Predicates
  29. protected:
  30. // Types
  31. // C'tors/D'tors
  32. // Operators
  33. // Operations
  34. // Access
  35. // Predicates
  36. // Variables
  37. private:
  38. // Types
  39. // C'tors/D'tors
  40. // Operators
  41. // Operations
  42. // Access
  43. // Predicates
  44. // Variables
  45. HCRYPTPROV m_hcryptprov;
  46. bool m_fDeleteOnDestruct;
  47. LPCTSTR m_szProvider;
  48. };
  49. #endif // SLBCSP_AUXCONTEXT_H