TKeyGenParams 结构使用 KG_GenerateRegistrationKey 和 KG_GenerateRegistrationKeyFromProject 获取注册密钥.
密钥长度 |
(输入参数) 注册密钥长度 (RSA 512/768/1024/2048/3072/4096), 有以下值 (请点击 常规选项 - 常规 获取注册密钥安全/长度值):
RM_512 = 0; RM_768 = 1; RM_1024 = 2; RM_2048 = 3; RM_3072 = 4; RM_4096 = 5;
|
密钥输出方式 |
(输入参数) 注册密钥输出方式 (Base 2/8/16/32/64), 有以下值 (详情请点击 常规选项 - 常规 了解输出密钥方式值):
RB_2 = 0; RB_8 = 1; RB_16 = 2; RB_32 = 3; RB_64 = 4;
|
密钥连接线 |
(输入参数) 设置为1则添加密钥连接线,为0则不添加 (了解更多,请点击 创建密钥);
|
密钥 |
(输入参数) unicode形式值, 空值注册密钥将使程序停止运行, 我们建议至少设置为 2048 字节长度;
|
密钥长度 |
(输入参数) 注册密钥字节长度; |
注册信息 |
(输入参数) ansi形式值, 空值注册信息将使程序停止运行;
|
注册信息长度 |
(输入参数) 注册信息长度; |
程序过期 |
(输入参数) 如果值为0则不激活,为1则限制程序有过期时间 (了解更多,请点击 创建密钥); |
过期年份 |
(输入参数) 密钥限制过期年份; |
过期月份 |
(输入参数) 密钥限制过期月份; |
过期日期 |
(输入参数) 密钥过期日期; |
硬件锁定 |
(输入参数) 设置为1则锁定硬件,为0则不做限制 (了解更多,请点击 创建密钥);
|
硬件ID类型 |
(输入参数) ansi形式值, 空值将使程序停止运行; |
限制程序运行 |
(输入参数) 设置为1激活限制程序运行,为0则不限制 (了解更多,请点击 创建密钥);
|
运行总次数 |
(输入参数) 注册密钥限制运行总次数; |
日期限制 |
(输入参数) 设置为1激活日期限制,为0则不限制 (了解更多,请点击 创建密钥);
|
日期合计 |
(输入参数) 注册密钥限制日期总数; |
限制运行时间 |
(输入参数) 设置为1激活限制运行时间,为0则不限制 (了解更多,请点击 创建密钥);
|
运行时间分钟 |
(输入参数) 注册密钥限制运行时间分钟数; |
限制总时间 |
(输入参数) 设置为1激活限制总时间,为0则不做限制 (see 创建密钥);
|
总运行时间分钟 |
(输入参数) 注册密钥限制总运行时间分钟数; |
限制区域 |
(输入参数) 设置为1激活限制区域,为0则不限制 (了解更多,请点击 创建密钥);
|
区域代码 |
(输入参数) 注册密钥限制区域代码 (点击 Enigma API EP_MiscCountryCode 了解更多区域代码); |
指定时间后注册 |
(输入参数) 设置为1激活指定时间后需注册,为0则不激活 (了解更多,请点击 创建密钥); |
指定年份后注册 |
(输入参数) 指定年份后注册; |
指定月份后注册 |
(输入参数) 指定月份后注册; |
指定日期后注册 |
(输入参数) 指定日期后注册; |
指定时间前注册 |
(输入参数) 设置为1激活指定时间需注册,为0则不激活 (了解更多,请点击 创建密钥); |
指定年份前注册 |
(输入参数) 指定年份前注册; |
指定月份前注册 |
(输入参数) 指定月份前注册; |
指定日期前注册 |
(输入参数) 指定日期前注册; |
加密常数 |
(输入参数) 从项目工程文件可以获取此常数 (详情请点击 常规选项 - 常规 获取信息); |
加密区间 |
(输入参数) 可设置16个加密区间 (详情请点击 创建密钥); |
公钥 |
(输入参数) 空值将导致程序停止运行,可在项目工程文件处获取 (详情请点击 常规选项 - 常规 获取信息); |
私钥 |
(输入参数) 空值将导致程序停止运行,可在项目工程文件处获取 (详情请点击 常规选项 - 常规 获取信息). |
TKeyGenParams = record
KeyMode : dword; RSA ???
KeyBase : dword; Base ???
KeyWithHyphens : boolean;
Key : pointer;
KeyLen : dword;
RegInfo : pointer;
RegInfoLen : dword;
UseKeyExpiration : boolean;
ExpirationYear : dword;
ExpirationMonth : dword;
ExpirationDay : dword;
UseHardwareLocking : boolean;
HardwareID : PAnsiChar;
UseExecutionsLimit : boolean;
ExecutionsCount : dword;
UseDaysLimit : boolean;
DaysCount : dword;
UseRunTimeLimit : boolean;
RunTimeMinutes : dword;
UseGlobalTimeLimit : boolean;
GlobalTimeMinutes : dword;
UseCountyLimit : boolean;
CountryCode : dword;
UseRegisterAfter : boolean;
RegisterAfterYear : dword;
RegisterAfterMonth : dword;
RegisterAfterDay : dword;
UseRegisterBefore : boolean;
RegisterBeforeYear : dword;
RegisterBeforeMonth : dword;
RegisterBeforeDay : dword;
EncryptedConstant : dword;
EncryptedSections : array [1..NUMBER_OF_CRYPTED_SECTIONS] of boolean;
PrivateKey : PAnsiChar;
PublicKey : PAnsiChar;
end;
PKeyGenParams = ^TKeyGenParams;
typedef struct _TKeyGenParams
{
DWORD KeyMode; RSA ???
DWORD KeyBase; Base ???
bool KeyWithHyphens;
char* Key;
DWORD KeyLen;
char* RegInfo;
DWORD RegInfoLen;
bool UseKeyExpiration;
DWORD ExpirationYear;
DWORD ExpirationMonth;
DWORD ExpirationDay;
bool UseHardwareLocking;
char* HardwareID;
bool UseExecutionsLimit;
DWORD ExecutionsCount;
bool UseDaysLimit;
DWORD DaysCount;
bool UseRunTimeLimit;
DWORD RunTimeMinutes;
bool UseGlobalTimeLimit;
DWORD GlobalTimeMinutes;
bool UseCountyLimit;
DWORD CountryCode;
bool UseRegisterAfter;
DWORD RegisterAfterYear;
DWORD RegisterAfterMonth;
DWORD RegisterAfterDay;
bool UseRegisterBefore;
DWORD RegisterBeforeYear;
DWORD RegisterBeforeMonth;
DWORD RegisterBeforeDay;
DWORD EncryptedConstant;
bool EncryptedSections[NUMBER_OF_CRYPTED_SECTIONS];
char* PrivateKey;
char* PublicKey;
} TKeyGenParams, *PKeyGenParams;
public struct TKeyGenParams
{
public Int32 KeyMode;
public Int32 KeyBase;
public bool KeyWithHyphens;
public string Key;
public Int32 KeyLen;
public string RegInfo;
public Int32 RegInfoLen;
public bool UseKeyExpiration;
public Int32 ExpirationYear;
public Int32 ExpirationMonth;
public Int32 ExpirationDay;
public bool UseHardwareLocking;
public string HardwareID;
public bool UseExecutionsLimit;
public Int32 ExecutionsCount;
public bool UseDaysLimit;
public Int32 DaysCount;
public bool UseRunTimeLimit;
public Int32 RunTimeMinutes;
public bool UseGlobalTimeLimit;
public Int32 GlobalTimeMinutes;
public bool UseCountyLimit;
public Int32 CountryCode;
public bool UseRegisterAfter;
public Int32 RegisterAfterYear;
public Int32 RegisterAfterMonth;
public Int32 RegisterAfterDay;
public bool UseRegisterBefore;
public Int32 RegisterBeforeYear;
public Int32 RegisterBeforeMonth;
public Int32 RegisterBeforeDay;
public Int32 EncryptedConstant;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = NUMBER_OF_CRYPTED_SECTIONS)]
public byte[] EncryptedSections;
public string PrivateKey;
public string PublicKey;
}
Public Type TKeyGenParams
KeyMode As Long
KeyBase As Long
KeyWithHyphens As Boolean
Key As String
KeyLen As Long
RegInfo As String
RegInfoLen As Long
UseKeyExpiration As Boolean
ExpirationYear As Long
ExpirationMonth As Long
ExpirationDay As Long
UseHardwareLocking As Boolean
HardwareID As String
UseExecutionsLimit As Boolean
ExecutionsCount As Long
UseDaysLimit As Boolean
DaysCount As Long
UseRunTimeLimit As Boolean
RunTimeMinutes As Long
UseGlobalTimeLimit As Boolean
GlobalTimeMinutes As Long
UseCountyLimit As Boolean
CountryCode As Long
UseRegisterAfter As Boolean
RegisterAfterYear As Long
RegisterAfterMonth As Long
RegisterAfterDay As Long
UseRegisterBefore As Boolean
RegisterBeforeYear As Long
RegisterBeforeMonth As Long
RegisterBeforeDay As Long
EncryptedConstant As Long
EncryptedSections(NUMBER_OF_CRYPTED_SECTIONS - 1) As Byte
PrivateKey As String
PublicKey As String
End Type