<add>first add
This commit is contained in:
		
							parent
							
								
									36953e0cc3
								
							
						
					
					
						commit
						3ba2706fb9
					
				| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					################################################################################
 | 
				
			||||||
 | 
					# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
 | 
				
			||||||
 | 
					################################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/build
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,18 @@
 | 
				
			||||||
 | 
					cmake_minimum_required(VERSION 3.16)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					project(certificate)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FILE(GLOB SRC src/*.cpp)
 | 
				
			||||||
 | 
					FILE(GLOB HEAD include/*.h)
 | 
				
			||||||
 | 
					FILE(GLOB API include/api/*.h)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					add_executable(${PROJECT_NAME} ${SRC} ${HEAD} ${API} README.md)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					target_include_directories(${PROJECT_NAME} PUBLIC include)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (MSVC)
 | 
				
			||||||
 | 
						target_compile_options(${PROJECT_NAME} PRIVATE /WX /utf-8)
 | 
				
			||||||
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					source_group("API" FILES  ${API})
 | 
				
			||||||
 | 
					source_group("DOC" FILES  README.md)
 | 
				
			||||||
| 
						 | 
					@ -1,2 +1,9 @@
 | 
				
			||||||
# certificate
 | 
					# certificate
 | 
				
			||||||
软件证书验证
 | 
					帮助软件注册和证书验证
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. 命名空间的定义
 | 
				
			||||||
 | 
					- os
 | 
				
			||||||
 | 
					与操作系统相关的操作统一在os下
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2. 接口的定义
 | 
				
			||||||
 | 
					3. 对象说明
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					#pragma once
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace util {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						class Ceroptions;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						class ICertificate {
 | 
				
			||||||
 | 
						public:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 获取与硬件相关的标识
 | 
				
			||||||
 | 
							virtual void GetMachineCode(char* code, uint16_t len) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 生成证书
 | 
				
			||||||
 | 
							virtual void CreateCertificate(Ceroptions* op) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 验证证书
 | 
				
			||||||
 | 
							virtual bool Verification(const char* lic) = 0;
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					#include <iostream>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue