filecipheragent.h

来自「一个用3DES加密文件的小测试程序!」· C头文件 代码 · 共 47 行

H
47
字号
// FileCipherAgent.h: interface for the CFileCipherAgent class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FILECIPHERAGENT_H__306489E0_A953_4152_99E7_1128AADCEFA7__INCLUDED_)
#define AFX_FILECIPHERAGENT_H__306489E0_A953_4152_99E7_1128AADCEFA7__INCLUDED_

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

#include "BaseThread.h"
class CFileCipherAgent:public CBaseThread  
{
public:
	void Close();
	void DenFile();
	void EnFile();
	void PrepareFile(char *strInFile,char *strOutFile);
	void SetFormat(pCipherOptionsFormat pformat=&g_zOptions);
	void Reset();
	CFileCipherAgent();
	virtual ~CFileCipherAgent();
private:
	FILE *fpIn,*fpOut;
	
	DWORD m_dwBlockCount,m_dwFileLen,m_dwCurPos,m_dwCurBlockIndex;

	pCipherOptionsFormat m_pformat;

	int m_nStartPos,m_nProcBlockLen,m_nProcBlockStep;
    
	DWORD m_dwStartClick,m_dwPreUpClick;

    char m_zbuffer[8*BLOCK_EACH_SIZE];
    bool m_bIsClosed;
private:
	void DecipherBlock(int nret);
	DWORD DaemonThread();
	void CipherBlock(int );
	int WriteBlock(int nlen=BLOCK_EACH_SIZE);
	int ReadBlock(int nlen=BLOCK_EACH_SIZE);

};

#endif // !defined(AFX_FILECIPHERAGENT_H__306489E0_A953_4152_99E7_1128AADCEFA7__INCLUDED_)

⌨️ 快捷键说明

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