fileex.h

来自「suitable file encryption and decryption 」· C头文件 代码 · 共 30 行

H
30
字号
// FileEx.h: interface for the CFileEx class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FILEEX_H__F85DCA61_CE1C_11D5_AEE6_00B0D0B8715B__INCLUDED_)
#define AFX_FILEEX_H__F85DCA61_CE1C_11D5_AEE6_00B0D0B8715B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

typedef UINT (FileEncryptProc)(const BYTE *pBuffer,UINT dwSize,BYTE *pDestination,DWORD dwParam);

class CFileEx  : public CFile
{
public:
	CFileEx(int nBufSize=4096);
	CFileEx(LPCTSTR lpszFileName, UINT nOpenFlags,int nBufSize=4096);
	virtual ~CFileEx();
	virtual UINT Read(void* lpBuf, UINT nCount);
	virtual void Write( const void* lpBuf, UINT nCount );
	void SetEncryption(FileEncryptProc *pEncrypt,DWORD dwEncryptParam,FileEncryptProc *pDecrypt,DWORD dwDecryptParam);
protected:
	BYTE* m_pBuf;
	FileEncryptProc *m_pEncrypt,*m_pDecrypt;
	DWORD	m_dwEncrypt,m_dwDecrypt;
};

#endif // !defined(AFX_FILEEX_H__F85DCA61_CE1C_11D5_AEE6_00B0D0B8715B__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?