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.

39 lines
771 B

  1. // KeyManager.h: interface for the CKeyManagerHash class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(_KEYCRYPTO_H)
  5. #define _KEYCRYPTO_H
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "Wincrypt.h"
  10. /*
  11. typedef BYTE RAWKEY[24];
  12. typedef BYTE ENCKEY[56];
  13. */
  14. class CKeyCrypto
  15. {
  16. public:
  17. // ==
  18. // NOTE:
  19. // when change the following strings, the ENCKEY_SIZE may be affected
  20. //
  21. const static UINT RAWKEY_SIZE = 24;
  22. CKeyCrypto();
  23. virtual ~CKeyCrypto(){};
  24. HRESULT encryptKey(DATA_BLOB* input, DATA_BLOB* output);
  25. HRESULT decryptKey(DATA_BLOB* input, DATA_BLOB* output);
  26. BOOL IsFromThis(PBYTE pData, ULONG cb);
  27. protected:
  28. DATA_BLOB m_EntropyBlob;
  29. };
  30. #endif // !defined(_KEYCRYPTO_H)