TKeyGenParamsW 是使用 KG_GenerateRegistrationKeyW 和 KG_GenerateRegistrationKeyFromProjectW 结构生成注册密钥。
密钥长度 |
(输入属性) 注册密钥长度(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形式值, 空值注册密钥将使程序停止运行,我们推荐设置至少4096字节长度密钥;
|
密钥长度 |
(输入参数) 注册密钥字节长度; |
注册信息 |
(输入参数) unicode形式值,空值注册信息将使程序停止运行;
|
密钥过期 |
(输入参数) 如值为0则注册密钥不会过期,如值为1则有时间限制,比如日期、月份、日等属性 (了解更多请点击 创建密钥); |
过期年份 |
(输入参数ter) 密钥指定过期年份; |
过期月份 |
(输入参数) 密钥指定过期月份; |
过期日期 |
(输入参数) 密钥指定过期日期; |
使用硬件锁定 |
(输入参数) 设置为1则激活硬件锁定,为0则不激活 (了解更多,请点击 创建密钥);
|
硬件ID类型 |
(输入参数) 空硬件ID将使程序停止运行; |
限制程序运行 |
(输入参数) 设置参数为1则激活限制程序运行,为0则不激活 (了解更多,请点击 创建密钥);
|
总运行次数 |
(输入参数)密钥限制程序运行次数; |
限制日期 |
(输入参数) 设置为1激活限制日期,为0则不做限制 (了解更多,请点击 创建密钥);
|
日期合计 |
(输入参数) 密钥限制天数; |
限制运行时间 |
(输入参数) 设置为1激活限制运行时间,为0则不限制 (了解更多,请点击 创建密钥);
|
运行时间分钟 |
(输入参数) 密钥限制运行时间分钟数; |
限制总运行时间 |
(输入参数) 设置为1激活限制总运行时间,为0则不做限制 (了解更多,请点击 创建密钥);
|
总运行时间分钟 |
(输入参数) 密钥限制总运行时间分钟数; |
限制区域 |
(输入参数) 设置为1激活限制区域,为0则不做限制 (了解更多,请点击 创建密钥);
|
区域代码 |
(输入参数) 密钥限制区域代码 (请点击 Enigma API EP_MiscCountryCode 了解关于区域代码更多信息); |
指定时间后注册 |
(输入参数) 设置1激活在指定时间后注册,为0则不激活。(了解更多,请点击 创建密钥); |
指定年份后注册 |
(输入参数) 在指定年份后注册; |
指定月份后注册 |
(输入参数) 在指定月份后注册; |
指定日期后注册 |
(输入参数) 在指定日期后注册; |
指定时间前注册 |
(输入参数) 设置为1激活指定时间前注册,为0则不激活 (了解更多,请点击 创建密钥); |
指定年份前注册 |
(输入参数) 在指定年份前注册; |
指定月份前注册 |
(输入参数) 在指定月份前注册; |
指定日期前注册 |
(输入参数) 在指定日期前注册; |
加密常数 |
(输入参数) 从项目工程文件可以获取此常数 (详细请点击 常规选项 - 常规 获取信息); |
加密区间 |
(输入参数) 可设置16个加密区间 (详情请点击 创建密钥); |
公钥 |
(输入参数) 空值将导致程序停止运行,可在项目工程文件处获取 (详情请点击 常规选项 - 常规 获取信息); |
私钥 |
(输入参数) 空值将导致程序停止运行,可在项目工程文件处获取 (详情请点击 常规选项 - 常规 获取信息). |
TKeyGenParamsW = record
KeyMode : dword; RSA ???
KeyBase : dword; Base ???
KeyWithHyphens : boolean;
Key : pointer;
KeyLen : dword;
RegInfo : PWideChar;
UseKeyExpiration : boolean;
ExpirationYear : dword;
ExpirationMonth : dword;
ExpirationDay : dword;
UseHardwareLocking : boolean;
HardwareID : PWideChar;
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 : PWideChar;
PublicKey : PWideChar;
end;
PKeyGenParamsW = ^TKeyGenParamsW;
typedef struct _TKeyGenParamsW
{
DWORD KeyMode; RSA ???
DWORD KeyBase; Base ???
bool KeyWithHyphens;
wchar_t* Key;
DWORD KeyLen;
wchar_t* RegInfo;
bool UseKeyExpiration;
DWORD ExpirationYear;
DWORD ExpirationMonth;
DWORD ExpirationDay;
bool UseHardwareLocking;
wchar_t* 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];
wchar_t* PrivateKey;
wchar_t* PublicKey;
} TKeyGenParamsW, *PKeyGenParamsW;
public struct TKeyGenParamsW
{
public Int32 KeyMode;
public Int32 KeyBase;
public bool KeyWithHyphens;
[MarshalAs(UnmanagedType.LPWStr)]
public string Key;
public Int32 KeyLen;
[MarshalAs(UnmanagedType.LPWStr)]
public string RegInfo;
public bool UseKeyExpiration;
public Int32 ExpirationYear;
public Int32 ExpirationMonth;
public Int32 ExpirationDay;
public bool UseHardwareLocking;
[MarshalAs(UnmanagedType.LPWStr)]
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;
[MarshalAs(UnmanagedType.LPWStr)]
public string PrivateKey;
[MarshalAs(UnmanagedType.LPWStr)]
public string PublicKey;
}