home *** CD-ROM | disk | FTP | other *** search
- // Xceed Encryption Library - Memory Encrypt sample
- // Copyright (c) 2001 Xceed Software Inc.
- //
- // [MemoryEncrypt.cpp]
- //
- // This file contains the application core, and some utility functions
- // like HexToBinary and BinaryToHex.
- //
- // This file is part of the Xceed Encryption Library sample applications.
- // The source code in this file is only intended as a supplement to Xceed
- // Encryption Library's documentation, and is provided "as is", without
- // warranty of any kind, either expressed or implied.
-
- #if !defined(AFX_MEMORYEncrypt_H__B826E892_847D_46EA_83BB_9934ABE78CA9__INCLUDED_)
- #define AFX_MEMORYEncrypt_H__B826E892_847D_46EA_83BB_9934ABE78CA9__INCLUDED_
-
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
-
- #ifndef __AFXWIN_H__
- #error include 'stdafx.h' before including this file for PCH
- #endif
-
- #include "resource.h" // main symbols
-
- // The different Encryption methods
- enum enuEncryptionMethod
- {
- eemRijndael = 0,
- eemTwofish = 1,
- };
-
- // The different hashing methods
- enum enuHashingMethod
- {
- ehmSHA = 0,
- ehmHaval = 1,
- };
-
- enum enuEncryptionMode
- {
- emoFreeBlocks = 0,
- emoChainedBlocks = 1,
- };
-
- enum enuPaddingMethod
- {
- epmFIPS81 = 0,
- epmRandom = 1,
- epmRFC1423 = 2,
- };
-
- // Utility functions
- COleVariant HexToBinary( LPCSTR sHexValue );
- CString BinaryToHex( VARIANT* vaBinaryValue );
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CMemoryEncryptApp:
- // See MemoryEncrypt.cpp for the implementation of this class
- //
-
- class CMemoryEncryptApp : public CWinApp
- {
- public:
- CMemoryEncryptApp();
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMemoryEncryptApp)
- public:
- virtual BOOL InitInstance();
- //}}AFX_VIRTUAL
-
- // Implementation
-
- //{{AFX_MSG(CMemoryEncryptApp)
- // NOTE - the ClassWizard will add and remove member functions here.
- // DO NOT EDIT what you see in these blocks of generated code !
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
-
- /////////////////////////////////////////////////////////////////////////////
-
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
- #endif // !defined(AFX_MEMORYEncrypt_H__B826E892_847D_46EA_83BB_9934ABE78CA9__INCLUDED_)
-