Source Insight 3 注册算法

Source Insight 3 的注册算法很简单,下面是一个随机生成注册码的算法,在VC下编译通过:

void SourceInsight3KeyGen(char *result)
{
	unsigned int key1 = GetTickCount() *  rand() % 1000000;
	unsigned int key2 = key1; 
	int mask[] = {0x96, 0x95, 0x10, 0x23, 0x07, 0x15};
	char seed[8]; 
	
	sprintf(seed, "%06u", key1);

	for (int i=0; i<6; i++)
	{
		key2 = (mask[i] ^ seed[i]) + key2 * 4;
	}
	sprintf(result, "SI3US-%06u-%05u", key1, key2 % 100000);
}

 

点赞