91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

rsa算法是一種非常安全的不對稱密鑰加密算法,是很多密碼產品和安全軟件的基礎,在共享軟件使用rsa算法的私鑰產生注冊碼,能有效抵御破解。 rsa算法的安全性取決于密鑰的長度,最少需要1024位,而編譯器提供的數據范圍,最大也只有64位,即使浮點數,也遠遠無法滿足算法的要求,這就必須使用大數運算庫。gmp是非常優秀的大數運算庫,但是它并不是轉為vc設計,想要在vc中使用,尤其是vs2010環境中使用,配置非常麻煩,這花了我一周的時間,才鏈接配置成功,在此記錄下來配置方法,一方面是為了加強自己的記憶,另一方面是為了幫助有需要的朋友。 配置方法在vs2010,unicode編碼下,debug和release模式下編譯成功,詳細配置方法在文件中,源代碼包括rsa加密解密代碼,你可以直接拷貝到自己的代碼中。rsa公鑰私鑰的生成可參考rsa tool軟件。

資源截圖

代碼片段和文件信息


//?BigIntTest.cpp?:?定義應用程序的類行為。
//

#include?“stdafx.h“
#include?“BigIntTest.h“
#include?“BigIntTestDlg.h“
//#include?“BigIntegerLibrary.hh“
//#include?“BigInteger.cc“
//#include?“BigUnsigned.cc“
//#include?“BigIntegerUtils.cc“
//#include?“BigUnsignedInAbase.cc“
#include?“gmp.h“
//#include?“
//#include?“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif


//?CBigIntTestApp

BEGIN_MESSAGE_MAP(CBigIntTestApp?CWinApp)
ON_COMMAND(ID_HELP?&CWinApp::onhelp)
END_MESSAGE_MAP()

extern?“C“?{?FILE?_iob[3]?=?{__iob_func()[0]?__iob_func()[1]?__iob_func()[2]};?}

//?CBigIntTestApp?構造

CBigIntTestApp::CBigIntTestApp()
{
//?支持重新啟動管理器
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_RESTART;

//?TODO:?在此處添加構造代碼,
//?將所有重要的初始化放置在?InitInstance?中
}


//?唯一的一個?CBigIntTestApp?對象

CBigIntTestApp?theApp;


//?CBigIntTestApp?初始化

BOOL?CBigIntTestApp::InitInstance()
{
//?如果一個運行在?Windows?XP?上的應用程序清單指定要
//?使用?ComCtl32.dll?版本?6?或更高版本來啟用可視化方式,
//則需要?InitCommonControlsEx()。否則,將無法創建窗口。
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?將它設置為包括所有要在應用程序中使用的
//?公共控件類。
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();


AfxEnableControlContainer();

//?創建?shell?管理器,以防對話框包含
//?任何?shell?樹視圖控件或?shell?列表視圖控件。
CShellManager?*pShellManager?=?new?CShellManager;

//?標準初始化
//?如果未使用這些功能并希望減小
//?最終可執行文件的大小,則應移除下列
//?不需要的特定初始化例程
//?更改用于存儲設置的注冊表項
//?TODO:?應適當修改該字符串,
//?例如修改為公司或組織名
SetRegistryKey(_T(“應用程序向導生成的本地應用程序“));

CBigIntTestDlg?dlg;
m_pMainWnd?=?&dlg;
INT_PTR?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?在此放置處理何時用
//??“確定”來關閉對話框的代碼
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?在此放置處理何時用
//??“取消”來關閉對話框的代碼
}

//?刪除上面創建的?shell?管理器。
if?(pShellManager?!=?NULL)
{
delete?pShellManager;
}

//?由于對話框已關閉,所以將返回?FALSE?以便退出應用程序,
//??而不是啟動應用程序的消息泵。
//BigInteger?a;
//int?b?=?a.toInt();
//BigInteger?c(a);
//std::string?s(“314“);
//BigInteger?f?=?stringToBigInteger(s);
//BigInteger?r=f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f
// *f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f
// *f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f
// *f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f
// *f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f
// *f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*f
// *f*f*f*f*f*f*f*f*f*f*f*f*f*f*f*

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????106716??2012-07-20?22:07??BigIntTest\BigIntTest\BigIntTest.aps

?????文件???????4409??2012-07-20?23:03??BigIntTest\BigIntTest\BigIntTest.cpp

?????文件????????466??2012-07-19?12:07??BigIntTest\BigIntTest\BigIntTest.h

?????文件??????11442??2012-07-20?22:07??BigIntTest\BigIntTest\BigIntTest.rc

?????文件???????7271??2012-07-20?23:02??BigIntTest\BigIntTest\BigIntTest.vcxproj

?????文件???????2214??2012-07-19?14:08??BigIntTest\BigIntTest\BigIntTest.vcxproj.filters

?????文件????????143??2012-07-19?12:07??BigIntTest\BigIntTest\BigIntTest.vcxproj.user

?????文件???????5589??2012-07-20?22:07??BigIntTest\BigIntTest\BigIntTestDlg.cpp

?????文件????????762??2012-07-19?16:23??BigIntTest\BigIntTest\BigIntTestDlg.h

?????文件???????3198??2012-07-19?12:07??BigIntTest\BigIntTest\ReadMe.txt

?????文件??????67777??2009-08-31?02:31??BigIntTest\BigIntTest\res\BigIntTest.ico

?????文件????????676??2012-07-19?12:07??BigIntTest\BigIntTest\res\BigIntTest.rc2

?????文件???????2010??2012-07-19?16:23??BigIntTest\BigIntTest\resource.h

?????文件????????143??2012-07-19?12:07??BigIntTest\BigIntTest\stdafx.cpp

?????文件???????1721??2012-07-20?16:49??BigIntTest\BigIntTest\stdafx.h

?????文件????????234??2012-07-19?12:07??BigIntTest\BigIntTest\targetver.h

?????文件????????897??2012-07-19?12:07??BigIntTest\BigIntTest.sln

????.....H.??????2054??2012-07-20?23:08??BigIntTest\BigIntTest.sln.docstates.suo

????..A..H.?????28160??2012-07-20?23:08??BigIntTest\BigIntTest.suo

?????文件?????205312??2012-07-20?23:03??BigIntTest\Debug\BigIntTest.exe

?????文件????????953??2012-07-20?23:08??BigIntTest\gmp在vs2010環境配置.txt

?????文件????1800192??2012-07-20?23:02??BigIntTest\Release\BigIntTest.exe

?????目錄??????????0??2012-07-20?20:45??BigIntTest\BigIntTest\res

?????目錄??????????0??2012-07-20?23:09??BigIntTest\BigIntTest

?????目錄??????????0??2012-07-20?23:10??BigIntTest\Debug

?????目錄??????????0??2012-07-20?23:10??BigIntTest\Release

?????目錄??????????0??2012-07-20?23:09??BigIntTest

-----------?---------??----------?-----??----

??????????????2252339????????????????????27



............此處省略0個文件信息

評論

共有 條評論