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.

98 lines
2.9 KiB

  1. // SesKeyCtx.h -- declaration of CSessionKeyContext
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1999. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #if !defined(SLBCSP_SESKEYCTX_H)
  8. #define SLBCSP_SESKEYCTX_H
  9. #include "KeyContext.h"
  10. class CSessionKeyContext
  11. : public CKeyContext
  12. {
  13. public:
  14. // Types
  15. // TO DO: reference SessionKeyBlob::size_type instead
  16. // typedef KeyBlob::size_type BlobSize;
  17. // C'tors/D'tors
  18. CSessionKeyContext(HCRYPTPROV hProv);
  19. ~CSessionKeyContext();
  20. // Operators
  21. // Operations
  22. virtual std::auto_ptr<CKeyContext>
  23. Clone(DWORD const *pdwReserved,
  24. DWORD dwFlags) const;
  25. virtual void
  26. Derive(ALG_ID algid,
  27. HCRYPTHASH hAuxBaseData,
  28. DWORD dwFlags);
  29. virtual void
  30. Generate(ALG_ID algid,
  31. DWORD dwFlags);
  32. virtual void
  33. ImportToAuxCSP();
  34. virtual void
  35. LoadKey(const BYTE *pbKeyBlob,
  36. DWORD cbKeyBlobLen,
  37. HCRYPTKEY hAuxImpKey,
  38. DWORD dwFlags);
  39. // Access
  40. virtual AlignedBlob
  41. AsAlignedBlob(HCRYPTKEY hcryptkey,
  42. DWORD dwBlobType) const;
  43. virtual StrengthType
  44. MaxStrength() const;
  45. virtual StrengthType
  46. MinStrength() const;
  47. // Predicates
  48. protected:
  49. // Types
  50. // C'tors/D'tors
  51. // Duplicate key context and its current state
  52. CSessionKeyContext(CSessionKeyContext const &rhs,
  53. DWORD const *pdwReserved,
  54. DWORD dwFlags);
  55. // Operators
  56. // Operations
  57. // Access
  58. // Predicates
  59. // Variables
  60. private:
  61. // Types
  62. // C'tors/D'tors
  63. // Operators
  64. // Operations
  65. // Access
  66. // Predicates
  67. // Variables
  68. DWORD m_dwImportFlags;
  69. };
  70. #endif // SLBCSP_SESKEYCTX_H