資源簡介
VC++ 使用RSA算法防止非法注冊機破解軟件
淺談如何利用VC++ 的RSA算法防止非法注冊機注冊軟件,也就是防止軟件被破解。熟悉編程的朋友可能都知道,RSA公開密鑰密碼系統是由 R.Rivest,A.Shamir,L.Adleman 提出的,不僅僅可用于數據的加密,也可用于數字簽名,其安全性比較高,用它來開發加密、解密系統的應用已經有很多了,希望通過這個類仿真,和同仁們共同切磋Vc++非法破解的防止。本程序調用Miracl ver 4.82大數運算庫。

代碼片段和文件信息
//?KeyGen.cpp?:?Defines?the?class?behaviors?for?the?application.
//?Download?by?http://www.codefans.net
#include?“stdafx.h“
#include?“KeyGen.h“
#include?“KeyGenDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CKeyGenApp
BEGIN_MESSAGE_MAP(CKeyGenApp?CWinApp)
//{{AFX_MSG_MAP(CKeyGenApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CKeyGenApp?construction
CKeyGenApp::CKeyGenApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CKeyGenApp?object
CKeyGenApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CKeyGenApp?initialization
BOOL?CKeyGenApp::InitInstance()
{
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CKeyGenDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
-----------?---------??----------?-----??----
???????????????965017????????????????????48
- 上一篇:國密SM3摘要算法工具
- 下一篇:gridctrl_demo
評論
共有 條評論