运行环境:Windows XP 开发环境:Microsoft Visual C++ 中文版 软件思路:加密密钥和解密密钥的生成过程: ① 选取两个足够大的质数P和Q; ② 计算P和Q相乘所产生的乘积n=P*Q; ③ 找出一个小于n的数e,使其符合与(P-1)*(Q-1)互为质数; ④ 另找一个数d,使其满足(e*d) mod [(P-1)*(Q-1)]=1; (n,e)即为公开密钥,(n,d)即为私有密钥。
Delphi常用数值算法源代码 procedure CHOBSB(A:MATRX2; N:integer; D:array of real;var B:array of real); var I,J:integer; SUM:real; begin For I:=1 To N do begin Sum:=B[I]; For J:=1 To I - 1 do Sum:=Sum - A[I, J] * B[J]; B[I]: =Sum; end; For I:=N DownTo 1 do begi
#include "stdio.h" #include "conio.h" #include "string.h" #define MAX 5000 int start,end,nodenum; void save1(); void save2(); void main() { FILE *fp1,*fp2,*fp3; float ver[50]; int t[14],i,j,m; int num_node[4]; int node_number; int n umber=0; float v
Dim TempTime As String Private Sub Command1_Click() Dim Ret As String If Trim(Text3.Text) = "" Then Text3.Text = 0 End If TempTime = Timer Ret = EncryptFile(Trim(Text1.Text), Trim(Text2.Text), Trim(Text3.Text)) Debug.Print Timer - TempTime Me.Captio
约瑟夫环的C++源代码 #include using namespace std; struct person { unsigned int number; unsigned int key; person *next; }; class joseph_ring { private: unsigned int n; unsigned int m; person *head; public: joseph_ring(){m=0;n=0;head=NULL; } void create(); vo