colordancer
发表于 2009-3-9 13:53:09
发现好多算法都是类似的,看汇编也差不多哎
liuyun213
发表于 2009-3-30 18:17:13
学习了,新版本改了一点,但是算法还是一样的
C++代码如下
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char mcode;
cout << "Enter mcode: ";
cin >> mcode;
int ecx, edx;
long ebx;
long key1 = 0;
for(ecx = 1, edx = strlen(mcode); edx > 0; --edx, ++ecx){
ebx = mcode;
ebx = ebx * 0x55939;
key1 += ebx;
key1 += 0x69316;
}
long key2 = 0;
for(ecx = 1, edx = strlen(mcode); edx > 0; --edx, ++ecx){
ebx = mcode;
ebx = ebx * 0x0C8649;
key2 += ebx;
key2 += 0x69316;
}
cout << "key1: " << key1 << endl
<< "key2: " << key2 << endl;
return 0;
}
2005ljb
发表于 2009-9-10 21:12:43
怎么新版本都找不到了。。。