2019-09-16 11:29:09 +08:00
|
|
|
|
package com.cm;
|
|
|
|
|
|
|
|
|
|
import com.cm.security.License;
|
|
|
|
|
import com.cm.security.utils.AddressUtil;
|
|
|
|
|
import com.cm.security.utils.AesUtil;
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @author Administrator
|
|
|
|
|
* @version 1.0
|
|
|
|
|
* @className LicenseTest
|
|
|
|
|
* @description TODO
|
|
|
|
|
* @date 2018/11/20 14:46
|
|
|
|
|
*
|
|
|
|
|
**/
|
|
|
|
|
public class LicenseTest {
|
|
|
|
|
|
2019-11-17 11:11:57 +08:00
|
|
|
|
@Test
|
2019-09-16 11:29:09 +08:00
|
|
|
|
public void licenseTest() throws Exception {
|
|
|
|
|
// 3C-A0-67-4A-88-D2
|
|
|
|
|
// 巴盟三务公开:6C-92-BF-4F-07-0D
|
|
|
|
|
// 包头东河三务公开:00-16-3E-00-62-F6
|
|
|
|
|
// 通用 00-16-3E-00-79-58
|
2019-10-12 00:09:31 +08:00
|
|
|
|
// 乌海海勃湾区 50-AF-73-27-2E-B2
|
2019-12-30 15:14:44 +08:00
|
|
|
|
// 东河新三务公开:00-16-3E-00-79-BC
|
2020-02-17 23:21:23 +08:00
|
|
|
|
// 本机:F0-79-60-1E-49-FC
|
|
|
|
|
// String mac = AddressUtil.getMacAddress();
|
|
|
|
|
// System.out.println(mac);
|
2020-02-19 16:46:11 +08:00
|
|
|
|
|
2020-03-13 15:15:07 +08:00
|
|
|
|
String license = License.getLicense("2020-02-18", "1000", "08-ED-B9-00-10-6D", "_System_License_");
|
2019-09-16 11:29:09 +08:00
|
|
|
|
System.out.println(license);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void licenseTimeTest() {
|
|
|
|
|
System.out.println(License.checkLicense("CMXX0471", "OFZRQ2JDU2lCelgwcUozaUpWL3ROZWw2Y3VsbXhrOGhCMDNDYXN3am5RWHBlbkxwWnNaUElRZE53bXJNSTUwRldRbFdiQ3JnRFoxNlJlcXpkdUxwUHhSQm9RcVFlV2pLZ1lOU2tkemNUb3lsR1l4UTRvbnBmckVEWGdRUFJkWEc="));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void aesTest() throws Exception {
|
|
|
|
|
String encode = AesUtil.aesEncoder("CMXX", "123");
|
|
|
|
|
//String decode = AesUtil.aesDecoder("ABCDEFGHIJKLMNRS", "vqZ8mVpLg2RqdPML+9tPxma3NrQDO/pECXWvUr/RIHE=");
|
|
|
|
|
System.out.println(encode);
|
|
|
|
|
//System.out.println(decode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void webServiceTest() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|