自己开发的游戏脱机挂,放出来大家交流
CMd5::~CMd5()
{
if(Sfile.is_open())Sfile.close();
if(Pointer){delete[]Pointer; Pointer=NULL;}
}
LPCSTR CMd5::TargetFile(char *filename)
{
if(!Init())SetErr(1);
static char temp[MAX_PATH];
strcpy(temp,fname);
strcpy(fname,filename);
CaculateFile();
return temp;
}
void CMd5::TargetStr(LPCSTR str)
{
if(!Init())SetErr(1);
CaculateStr(str);
}
bool CMd5::Init()
{
*fname='\0';
IsSuc=true;
*Digest='\0';
try{
Pointer=new BYTE[sizeof(ULONG)*16];
}
catch(bad_alloc w)
{
Pointer=NULL;
SetErr(1);
}
pM=(ULONG*)Pointer;
FileLen=0;
for(int i=0;i<4;i++)
T[i]=Context[i];
return true;
}
bool CMd5::OpenFile()
{
Sfile.open(fname,ios::in|ios::nocreate|ios::binary);
if(!Sfile)
{
SetErr(0);
}
return true;
}
bool CMd5::Read64Byte()
2022-01-17 18:23:23
7.72MB
脱机挂
1