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

📄 desdlg.h

📁 这是我在学习Visual C++过程中做过的一个程序,可以作为大家学习Visual c++编程能力学习的参考,相信对读者会有所启发.
💻 H
字号:
// DESDlg.h : header file
//

#if !defined(AFX_DESDLG_H__4C6F3CEC_16B8_4377_88CF_F6563FD2A025__INCLUDED_)
#define AFX_DESDLG_H__4C6F3CEC_16B8_4377_88CF_F6563FD2A025__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CDESDlg dialog

class CDESDlg : public CDialog
{
// Construction
public:
	bool m_runable;

	int t1[65];    //用来存放IP逆置换后得到的密文
	int t3[65];    //用来存放IP逆置换后得到的解密后的原文
	int K[17][49];
	void SOURCE_BIO();
	void KEY_BIO();
	void DES_ENCIPHER();
	void DES_DECIPHER();

	int R0[33];    //用来存放右侧明文
	int L0[33];    //用来存放左侧明文

	long m_fSize;
	CDESDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CDESDlg)
	enum { IDD = IDD_DES_DIALOG };
	CStatic	m_ctlText;
	CStatic	m_ctlText2;
	CProgressCtrl	m_ctlProgress;
	CString	m_StrKey;
	CString	m_strText;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDESDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CDESDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnShift();
	afx_msg void OnMfilesave();
	afx_msg void OnSfilesave();
	afx_msg void OnSfileopen();
	afx_msg void OnCfileopen();
	afx_msg void OnDefaultfill();
	afx_msg void OnExit();
	afx_msg void OnClear();
	afx_msg void OnAuthor();
	afx_msg void OnCipherbutton();
	afx_msg void OnDecipherbutton();
	afx_msg void OnExitbutton();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
    void FileSOpen(CFileDialog &m_foDlg);
	void FileOpen(CFileDialog& m_foDlg);

	void DES_GenerateSubkey(int CE[],int DE[],int Cx[],int Dx[],
							int K[][49],int kn);
    void DES_ITERATIVE(int LE[],int RE[],int Lx[],int Rx[],
					   int sub_key[]);
	CString m_StrSource;
	CString m_StrDeciphered;
	CString m_StrCiphered;  

	bool m_seeable;
	int Key[64];
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DESDLG_H__4C6F3CEC_16B8_4377_88CF_F6563FD2A025__INCLUDED_)

⌨️ 快捷键说明

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