|
@@ -7,6 +7,7 @@ import javax.crypto.Cipher;
|
|
|
import javax.crypto.spec.IvParameterSpec;
|
|
|
import javax.crypto.spec.SecretKeySpec;
|
|
|
|
|
|
+import cn.hutool.crypto.digest.MD5;
|
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
|
import com.fdkankan.manage.exception.BusinessException;
|
|
|
import org.apache.commons.codec.binary.Base64;
|
|
@@ -122,7 +123,7 @@ public class AesUtil {
|
|
|
* 测试
|
|
|
*/
|
|
|
public static void main(String args[]) throws Exception {
|
|
|
- String data = "sg123456";
|
|
|
+ String data = "123456";
|
|
|
//String key = getRandomStringKey(); //0000001210830863
|
|
|
//String iv = getRandomStringIv(); //1xo1ub7m2rsz92ev
|
|
|
|
|
@@ -130,6 +131,7 @@ public class AesUtil {
|
|
|
|
|
|
System.out.println(enData);
|
|
|
System.out.println(desEncrypt(enData, key, iv));
|
|
|
+ System.out.println(MD5.create().digestHex(data));
|
|
|
}
|
|
|
}
|
|
|
|