Package com.bytedesk.core.license
Class LicenseGenerator
java.lang.Object
com.bytedesk.core.license.LicenseGenerator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
解密数据private String
加密数据generateLicense
(String phone, String email, String name, String company, String serverIp, LicenseTypeEnum licenseType, int userCount, Set<LicenseFeatureEnum> features) 生成授权信息private String
generateLicenseKey
(LicenseInfo licenseInfo) 生成激活密钥private String
生成唯一标识符private byte[]
getKey()
生成密钥validateLicense
(String licenseKey) 验证授权信息
-
Field Details
-
ALGORITHM
- See Also:
-
SECRET_KEY
- See Also:
-
-
Constructor Details
-
LicenseGenerator
public LicenseGenerator()
-
-
Method Details
-
generateLicense
public LicenseInfo generateLicense(String phone, String email, String name, String company, String serverIp, LicenseTypeEnum licenseType, int userCount, Set<LicenseFeatureEnum> features) throws Exception 生成授权信息- Throws:
Exception
-
validateLicense
验证授权信息- Throws:
Exception
-
generateUid
生成唯一标识符 -
generateLicenseKey
生成激活密钥- Throws:
Exception
-
encrypt
加密数据- Throws:
Exception
-
decrypt
解密数据- Throws:
Exception
-
getKey
生成密钥- Throws:
Exception
-