# 忽略所有警告,否则有警告的时候混淆会停止
-ignorewarnings
# JDK目标版本1.8
-target 1.8
# 不做收缩(删除注释、未被引用代码)
-dontshrink
# 不做优化(变更代码实现逻辑)
-dontoptimize
# 不路过非公用类文件及成员
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
# 优化时允许访问并修改有修饰符的类和类的成员
-allowaccessmodification
# 确定统一的混淆类的成员名称来增加混淆
-useuniqueclassmembernames
# 不混淆所有包名,本人测试混淆后WEB项目问题实在太多,毕竟Spring配置中有大量固定写法的包名
-keeppackagenames
# 不混淆局部变量名
-keepparameternames
# 不混淆所有特殊的类 LocalVariable*Table,
#-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,Synthetic,EnclosingMethod
# 不混淆包下的所有类名
-keep class weg.base.** { <methods>; }
-keep class weg.service.** { <methods>; }
-keep class weg.dao.** { <methods>; }
-keep class weg.util.** { <methods>; }
# 不混淆quartz包下的所有类名,且类中的方法也不混淆
-keep class weg.quartz.** { <methods>; }
# 不混淆model包中的所有类以及类的属性及方法,实体包,混淆了会导致ORM框架及前端无法识别
-keep class weg.model.** {*;}
# 不混淆所有的set/get方法,毕竟项目中使用的部分第三方框架(例如Shiro)会用到大量的set/get映射
-keepclassmembers public class * {void set*(***);*** get*();}
# 保持类protected不被混淆
-keep public class * { public protected <fields>;public protected <methods>; }
package sdk;
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
import javax.crypto.Cipher;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
import javax.crypto.spec.IvParameterSpec;
import java.net.NetworkInterface;
import java.security.Key;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.spec.AlgorithmParameterSpec;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
/**
* Created with IntelliJ IDEA.
*
* @Auther: ljt
* @Version 1.0
* @Date: 2020/09/01/10:32
* @Description:
*/
public class CheckActiveCode {
//向量(同时拥有向量和密匙才能解密),此向量必须是8byte,多少都报错
private static byte[] DESIV = new byte[] { 0x22, 0x54, 0x36, 110, 0x40, (byte) 0xac, (byte) 0xad, (byte) 0xdf };// 向量
private static AlgorithmParameterSpec iv = null;// 加密算法的参数接口
private static Key key = null;
private sta