資源簡介
隨機生成2個大素數,算出公鑰私鑰,實現加密解密
代碼片段和文件信息
#include?“Big.h“
#include?
#include?
#include?
#include?
using?namespace?std;
void?Big::Output()
{
if(!negative)
cout<<‘-‘;
int?i?=?length?-?1;
cout<se(16)< for(;i?>=?0;i--)
cout<se(16)< cout< }
void?Big::Push_back(const?long?n)
{
numbers[length++]?=?n;
}
Big::Big(const?long?n0)
{
long?n=n0;
length?=?0;
if(n?>=?0)
negative?=?true;
else
{
n?=?-n;
negative?=?false;
}
// unsigned?long?temp; // temp?=?n?%?4294967296; //65536?*?65536
Push_back(n);
this->Clean();
}
void?Big::Clean()
{
if(!length)
{
Push_back(0);
return;
}
while(!numbers[length-1])
{
length--;
if(length<=0)
break;
}
if
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????13156??2008-10-14?12:50??RSA_others\Big.cpp
?????文件???????3484??2008-10-14?00:26??RSA_others\Big.dsp
?????文件????????531??2008-10-14?00:26??RSA_others\Big.dsw
?????文件???????1197??2008-10-14?00:51??RSA_others\Big.h
?????文件??????41984??2008-10-20?22:20??RSA_others\Big.ncb
?????文件??????48640??2008-10-20?22:20??RSA_others\Big.opt
?????文件????????859??2008-10-20?22:14??RSA_others\Big.plg
?????文件?????581696??2008-10-20?22:14??RSA_others\Debug\Big.exe
?????文件?????818988??2008-10-20?22:14??RSA_others\Debug\Big.ilk
?????文件?????208782??2008-10-20?22:03??RSA_others\Debug\Big.obj
?????文件????2374468??2008-10-20?22:03??RSA_others\Debug\Big.pch
?????文件????1123328??2008-10-20?22:14??RSA_others\Debug\Big.pdb
?????文件?????160407??2008-10-20?22:13??RSA_others\Debug\main.obj
?????文件????2366284??2008-10-20?22:07??RSA_others\Debug\main.pch
?????文件??????25600??2008-10-20?22:13??RSA_others\Debug\main.pdb
?????文件??????82944??2008-10-20?22:18??RSA_others\Debug\vc60.idb
?????文件?????118784??2008-10-20?22:13??RSA_others\Debug\vc60.pdb
?????文件???????1899??2008-10-14?12:58??RSA_others\main.cpp
?????文件???????3241??2008-10-20?22:20??RSA_others\main.dsp
?????文件????????533??2008-10-20?22:20??RSA_others\main.dsw
?????文件??????41984??2008-10-20?22:20??RSA_others\main.ncb
?????文件??????48640??2008-10-20?22:20??RSA_others\main.opt
?????文件???????2948??2008-10-20?22:13??RSA_others\main.plg
?????目錄??????????0??2008-10-20?22:14??RSA_others\Debug
?????目錄??????????0??2008-10-20?22:20??RSA_others
-----------?---------??----------?-----??----
??????????????8070377????????????????????25
評論
共有 條評論