|  |  |  | 
|---|
|  |  |  | import javax.crypto.spec.SecretKeySpec; | 
|---|
|  |  |  | import javax.xml.bind.DatatypeConverter; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Slf4j(topic="Authorize") | 
|---|
|  |  |  | @Slf4j(topic="authorize") | 
|---|
|  |  |  | public class AuthorizeUtil { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static String MachineCode=""; | 
|---|
|  |  |  | 
|---|
|  |  |  | public static void main(String[] args) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | AuthorizeUtil ss = new AuthorizeUtil(); | 
|---|
|  |  |  | System.out.println("sysStr " + ss.parsLicense()); | 
|---|
|  |  |  | System.out.println("MachineCode " + ss.getMachineCode()); | 
|---|
|  |  |  | System.out.println("CPUCode     " + ss.getCPUCode()); | 
|---|
|  |  |  | log.debug("sysStr " + ss.parsLicense()); | 
|---|
|  |  |  | log.debug("MachineCode " + ss.getMachineCode()); | 
|---|
|  |  |  | log.debug("CPUCode     " + ss.getCPUCode()); | 
|---|
|  |  |  | //String codeString=ss.parsLicense("b1db709f19d9769e536e2e29888e38b2"); | 
|---|
|  |  |  | //System.out.println(codeString); | 
|---|
|  |  |  | //ss.makeTempLicense(); | 
|---|
|  |  |  | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("获取机器码异常:"+e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return Md5Utils.hash(sb.toString().toUpperCase()); | 
|---|
|  |  |  | String code = Md5Utils.hash(sb.toString().toUpperCase()); | 
|---|
|  |  |  | log.debug("机器码:"+code); | 
|---|
|  |  |  | return code; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static String getCPUCode() { | 
|---|