⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 softwarekey_vendortool.cpp

📁 通过key保护程序以增强程序的安全程度
💻 CPP
字号:
#include "csoftwarekey.h" 

// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
int main(int argc, char* argv[])
{
	RETVALUE lResult = SUCCESS;

	printf("\nSoftware key - Vendor Tool - Software key generator\n\n");

	if (argc != 3)
	{		
		printf("Usage is:\n\n");
		printf("softwarekey_vendortool -v MachineCode\n\n");
	}
	else
	if (strcmp(argv[1],"-v")==0)
	{
		// Get the machine code from the command line
		BYTE*			lMachineCode = NULL;
		unsigned int	lMachineCodeSize = 0;
		lResult = CSoftwareKey::String2Buffer(
									argv[2], 
									&lMachineCode, 
									&lMachineCodeSize); 
		
		// Compute the software key
		BYTE lSoftwareKey[SOFTWAREKEY_DIM];
		lResult = CSoftwareKey::ComputeSoftwareKey(lMachineCode, lSoftwareKey); 

		// Print the software key
		char* lSoftwareKeyString = NULL;
		lResult = CSoftwareKey::Buffer2String(
						lSoftwareKey, 
						SOFTWAREKEY_DIM, 
						&lSoftwareKeyString);
		
		printf(
			"\nThe software key for the machine code [%s] is: %s\n\n", 
			argv[2], 
			lSoftwareKeyString);
	} 
	else
	{
		printf("Usage is:\n\n");
		printf("softwarekey_vendortool -v MachineCode\n\n");
	}

	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -