Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

VISUAL C ++60.DOC
Nội dung xem thử
Mô tả chi tiết
Phô lôc hÖ mËt RSA
Phô lôc
Trong phÇn nµy t«i xin giíi thiÖu mét sè thñ tôc chÝnh ®îc viÕt trong m«i trêng Visual C++6.0. Nã gåm hai tÖp chÝnh lµ Dll.cpp ( chøa c¸c hµm vµ thñ
tôc) vµ Dll.def (c¸c hµm xuÊt khÈu):
File Dll.cpp
// Ch¬ng tr×nh m· ho¸ DL b»ng RSA
// DÞch file nµy ra file Dll.dll
#include <windows.h>
#include <fcntl.h>
#include <io.h>
#include <malloc.h>
#include <stdio.h>
#include <conio.h>
#include <stddef.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define C_max 200
#define M16 65535
#define Mmax 65536
#define thap(x) ((x)&M16)
#define cao(x) ((x)>>16)
typedef unsigned short WORD;
typedef unsigned long LONG1;
typedef WORD So_Lon[C_max];
WORD C=23,KEP[2*C_max];
LONG1 dau_mod;
So_Lon khoama,khoagiai,MOD;
int tongso;
int far pascal LibMain(HANDLE hIndtance,WORD wDataseg,WORD
wHeapSize,LPSTR lpCmdline)
{
if (wHeapSize!=0)
return 1;
else
return 0;
}
int far pascal WED(int nParameter)
{
return 1;