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.

36 lines
1.1 KiB

  1. // CoCrypt.h: interface for the CCoCrypt class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_COCRYPTNOBINHEX_H__41651BFB_A5C8_11D2_95DF_00C04F8E7A70__INCLUDED_)
  5. #define AFX_COCRYPTNOBINHEX_H__41651BFB_A5C8_11D2_95DF_00C04F8E7A70__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "nt\des.h"
  10. #include "nt\tripldes.h"
  11. #include "nt\modes.h"
  12. class CCoCryptNoBinhex
  13. {
  14. public:
  15. CCoCryptNoBinhex();
  16. virtual ~CCoCryptNoBinhex();
  17. bool Decrypt32(const long lVectLen, const long lPaddingLen, const BYTE * byPadding, const BYTE *rawData, UINT dataSize, BSTR *pUnencrypted);
  18. bool Encrypt32(const long lVectLen, const long lPaddingLen, const BYTE * byPadding, const LPSTR rawData, UINT dataSize, BYTE *pEncrypted, UINT cbOut);
  19. bool setKeyMaterial(const char *newVal); // length of newVal must be 24 bytes
  20. bool setKeyMaterial(long cb, const BYTE *newVal);
  21. static const long s_kKeyLen;
  22. protected:
  23. DES3TABLE ks;
  24. };
  25. #endif // !defined(AFX_COCRYPT_H__41651BFB_A5C8_11D2_95DF_00C04F8E7A70__INCLUDED_)