rsautildlg.h

来自「RSA加密解密算法」· C头文件 代码 · 共 111 行

H
111
字号
// RSAUtilDlg.h : header file
//

#if !defined(AFX_RSAUTILDLG_H__6B824F05_E7B9_4285_A89D_2A4144246036__INCLUDED_)
#define AFX_RSAUTILDLG_H__6B824F05_E7B9_4285_A89D_2A4144246036__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CRSAUtilDlg dialog
#include "RandomGenerator.h"
#include "BigNumber.h"
#include "RSA.h"
class CRSAUtilDlg : public CDialog
{
private:
	CRSA				m_rsa;

	CRandomGenerator	m_rand;
	CPoint				m_ptLastMousePos;
	CFont				m_fontMessage;

	void _UpdateRandomGenetator(int n);

	BOOL _ReformatOutputString(CString& str, const CBigNumber& b);

	BOOL _BuildStringC(CString& str);
	
	BOOL _GetPublicE(CBigNumber& e);
	
	int		m_nGenProcessRetryCount;
	int		m_nProcessingPrivate;
	DWORD	m_dwProcessBeginTick;
	BOOL	m_bCancelGen;
	BOOL	m_bGenWorking;
	friend int _GenProcessing(void* arg, int c);
	friend int _RsaKeyGenProcessing(void* arg, int c);
	
	CString m_strAppPath;

	BOOL m_bBackgroundCalculating;
	// Construction
public:
	CRSAUtilDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CRSAUtilDlg)
	enum { IDD = IDD_RSAUTIL_DIALOG };
	CComboBox	m_combPublicE;
	CProgressCtrl	m_pbDE;
	CEdit	m_editPrimeQ;
	CEdit	m_editPrimeP;
	CButton	m_btnGenerate;
	CStatic	m_staticRandomMessage;
	CStatic	m_staticMessage;
	CComboBox	m_combViewAs;
	CProgressCtrl	m_pbRandom;
	CString	m_strKeySize;
	CString	m_strMessageC;
	CString	m_strMessageM;
	CString	m_strPrimeP;
	CString	m_strPrimeQ;
	CString	m_strPrivateD;
	CString	m_strMessage;
	CString	m_strNRealSize;
	CString	m_strKeyN;
	int		m_nCombViewAs;
	int		m_nEncryptionDecryptionTestTimes;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CRSAUtilDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnChangeEditKeySize();
	afx_msg void OnButtonCStringToClipboard();
	afx_msg void OnButtonGenerateNow();
	afx_msg void OnChangeEditMessageM();
	afx_msg void OnButtonEncrypt();
	afx_msg void OnButtonDecrypt();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnButtonCalculateND();
	afx_msg void OnChangeEditPrimeP();
	afx_msg void OnChangeEditPrimeQ();
	afx_msg void OnSelchangeComboViewAs();
	afx_msg void OnButtonSaveToDb();
	afx_msg void OnClose();
	virtual void OnOK();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_RSAUTILDLG_H__6B824F05_E7B9_4285_A89D_2A4144246036__INCLUDED_)

⌨️ 快捷键说明

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