home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / vbasic / Data / Utils / XZipComp.exe / XceedEncryption.Cab / F113015_MemoryEncrypt.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-07-04  |  2.3 KB  |  92 lines

  1. // Xceed Encryption Library - Memory Encrypt sample
  2. // Copyright (c) 2001 Xceed Software Inc.
  3. //
  4. // [MemoryEncrypt.cpp]
  5. //
  6. // This file contains the application core, and some utility functions
  7. // like HexToBinary and BinaryToHex.
  8. //
  9. // This file is part of the Xceed Encryption Library sample applications.
  10. // The source code in this file is only intended as a supplement to Xceed
  11. // Encryption Library's documentation, and is provided "as is", without
  12. // warranty of any kind, either expressed or implied.
  13.  
  14. #if !defined(AFX_MEMORYEncrypt_H__B826E892_847D_46EA_83BB_9934ABE78CA9__INCLUDED_)
  15. #define AFX_MEMORYEncrypt_H__B826E892_847D_46EA_83BB_9934ABE78CA9__INCLUDED_
  16.  
  17. #if _MSC_VER > 1000
  18. #pragma once
  19. #endif // _MSC_VER > 1000
  20.  
  21. #ifndef __AFXWIN_H__
  22.     #error include 'stdafx.h' before including this file for PCH
  23. #endif
  24.  
  25. #include "resource.h"        // main symbols
  26.  
  27. // The different Encryption methods
  28. enum enuEncryptionMethod
  29. {
  30.   eemRijndael = 0,
  31.   eemTwofish = 1,
  32. };
  33.  
  34. // The different hashing methods
  35. enum enuHashingMethod
  36. {
  37.   ehmSHA = 0,
  38.   ehmHaval = 1,
  39. };
  40.  
  41. enum enuEncryptionMode
  42. {
  43.   emoFreeBlocks = 0,
  44.   emoChainedBlocks = 1,
  45. };
  46.  
  47. enum enuPaddingMethod
  48. {
  49.   epmFIPS81 = 0,
  50.   epmRandom = 1,
  51.   epmRFC1423 = 2,
  52. };
  53.  
  54. // Utility functions
  55. COleVariant HexToBinary( LPCSTR sHexValue );
  56. CString BinaryToHex( VARIANT* vaBinaryValue );
  57.  
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CMemoryEncryptApp:
  61. // See MemoryEncrypt.cpp for the implementation of this class
  62. //
  63.  
  64. class CMemoryEncryptApp : public CWinApp
  65. {
  66. public:
  67.     CMemoryEncryptApp();
  68.  
  69. // Overrides
  70.     // ClassWizard generated virtual function overrides
  71.     //{{AFX_VIRTUAL(CMemoryEncryptApp)
  72.     public:
  73.     virtual BOOL InitInstance();
  74.     //}}AFX_VIRTUAL
  75.  
  76. // Implementation
  77.  
  78.     //{{AFX_MSG(CMemoryEncryptApp)
  79.         // NOTE - the ClassWizard will add and remove member functions here.
  80.         //    DO NOT EDIT what you see in these blocks of generated code !
  81.     //}}AFX_MSG
  82.     DECLARE_MESSAGE_MAP()
  83. };
  84.  
  85.  
  86. /////////////////////////////////////////////////////////////////////////////
  87.  
  88. //{{AFX_INSERT_LOCATION}}
  89. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  90.  
  91. #endif // !defined(AFX_MEMORYEncrypt_H__B826E892_847D_46EA_83BB_9934ABE78CA9__INCLUDED_)
  92.