⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filecipheragent.h

📁 一个用3DES加密文件的小测试程序!
💻 H
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -