|
@@ -1,5 +1,6 @@
|
|
|
package com.pj.utils.ht;
|
|
|
|
|
|
+import com.pj.rabbitmq.RabbitMQ;
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
@@ -219,15 +220,70 @@ public class AESUtil {
|
|
|
System.out.println("aes解密结果:" + decrypt);
|
|
|
System.out.println();
|
|
|
|
|
|
+ /*
|
|
|
+边民: CkB9nBTgtwQYyW+/luLX0BdXYHTdcBMnQRnN1BHVWDjXd1Gqt9Yl3M/lI5WxljI39cJa3XTmWT3WH/zQpG4AZsqbSb1TO8f43+UgdQRfJqChYy69B2JZsV0856REEBb7h89mYXyCTHl3eeImf/Ilw8Xq5XQ6cc0WV4/AltZLVj9AiCqi0YV2PY7FXjl6nP/gboh3T+Z+LxNmY/iTk5oUUhaIxt+PFitgkEkOeZrTP3NhLxtaAPwoFxDmPGSZEWWDLgJSdvJeYMUKPz+sL12ybzMVudqo6B2lYUDCWpcQ4L6pGJaXH7qBwUPyOxFn2Nf7FTHNxC3UkIrVNLeAfxf0CctLnnmJALY97bRQu7iuAcojh/zvQV91u3L4lek0xyiKSiVcNSdBbPG4zNPnv/ocWouphcV6IY2ncoP0RBQFVqsD9q5l5kC05q6XWqDkE3BM/WkqeWvh49epGb9SwUzoD0NpQXqqQAUpW0dE+KLWwb7QdWOi626epPZ9XxyJcyDS
|
|
|
+
|
|
|
+商铺: CkB9nBTgtwQYyW+/luLX0P7AN7AG9vhXlSNzkpfp33/HoZX6MjrrBrQnRJkKy1nOeahRTV90bkIZYymuy9iUlegyIOwF/W2eEBQTJqBde3zTZT9BLDiua1cdaS3vFsOuzB4VZ+jwkcmwppw18uscw8DDT0Ay/YHCXCalecLrlqYKu9Ahi3bX/0QqoKoI2x0Rx1rAObdsK22eBrbw+U82M4Jm+B5wPoKVbyotP2WN3RecYkG7LxuXphob2HtJYM8ot86y3PqqactXBWF/10FHSWdyAhTT1eDeA2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myx0LgU2S1HqOE5bypfnF9x0uVoWkL1igcDC8MnFA08rzEKaX94Qm8nrVYxNk+uypR3Z0BRYygvEtO5we9w/RnszwcKhTIA4jb4KXHf3XRM9JaQivhzeo+wJpiWhXdJVyipRLjHGzpIbNjrvksWnXF55budIwgxuLscyzVjTPG2G8I4IVAjbfpdd9hfy9PZn1vG9sev2Re31D3kHndCAETGbWzWb9
|
|
|
+
|
|
|
+ */
|
|
|
|
|
|
System.out.println("--------AES_CBC加密解密---------");
|
|
|
- String cbcResult = encryptCBC("测试AES加密12456", random);
|
|
|
+// String cbcResult = encryptCBC("{ \"platSeqNo\": \"1111111111\", \"birplAddr\": \"云南昆明\", \"borderName\": \"张边民\",\"borderTel\": \"18896542158\",\"customsCode\": \"10086\", \"startDate\": \"2012-5-7\",\"endDate\": \"2022-8-9\", \"expiry\": \"2025-8-7\",\"fieldCode\": \"2546\",\"filingStatus\": \"1\", \"gencd\": \"2\", \"idCardNo\": \"452036547821563014\",\"idcdGcertPgoffNm\": \"云南海关\", \"localGovernmentNo\": \"0771\", \"putrecNo\": \"123456789\"}", RabbitMQ.ACC_KEY);
|
|
|
+ String cbcResult = encryptCBC("{ \"platSeqNo\": \"54453\", \n" +
|
|
|
+ "\"customsCode\": \"43535\", \n" +
|
|
|
+ "\"orgName\": \"不知道叫什么互助组\", \n" +
|
|
|
+ "\"address\": \"云南互市\",\n" +
|
|
|
+ " \"shopsSccd\": \"23124\",\n" +
|
|
|
+ " \"eDStatus\": \"1\",\n" +
|
|
|
+ " \"expiry\": \"2025-9-9\", \n" +
|
|
|
+ "\"putrecNo\": \"523523\", \n" +
|
|
|
+ "\"localGovernmentNo\": \"46465\",\n" +
|
|
|
+ " \"filingStatus\": \"1\", \n" +
|
|
|
+ "\"fieldCode\": \"512412\", \n" +
|
|
|
+ "\"borderList\": [\n" +
|
|
|
+ "{ \"borderNo\":\"31231\",\n" +
|
|
|
+ " \"borderPutrecNo\":\"14213123\",\n" +
|
|
|
+ " \"borderName\":\"什么鬼\",\n" +
|
|
|
+ " \"idCardNo\":\"54236987412369820\",\n" +
|
|
|
+ " \"borderAddr\":\"云南昆明\",\n" +
|
|
|
+ " \"borderTel\":\"12354821456\", \n" +
|
|
|
+ "\"groupId\":\"14\"\n" +
|
|
|
+ "},\n" +
|
|
|
+ "{ \"borderNo\":\"131\", \n" +
|
|
|
+ "\"borderPutrecNo\":\"41422\",\n" +
|
|
|
+ " \"borderName\":\"王小锤\",\n" +
|
|
|
+ " \"ciphertextIdno\":\"36542158963214752\",\n" +
|
|
|
+ " \"borderAddr\":\"云南普洱\", \n" +
|
|
|
+ "\"borderTel\":\"1258453454\",\n" +
|
|
|
+ " \"groupId\":\"14\"\n" +
|
|
|
+ "}],\"dclBorderList\": [\n" +
|
|
|
+ "{\n" +
|
|
|
+ "\"dclNo\":\"31\",\n" +
|
|
|
+ " \"borderPutrecNo\":\"421312\",\n" +
|
|
|
+ " \"declareName\":\"犬鸡笼\",\n" +
|
|
|
+ " \"idCardNo\":\"54641145521452\",\n" +
|
|
|
+ " \"borderTel\":\"1456123135\",\n" +
|
|
|
+ " \"groupId\":\"14\"\n" +
|
|
|
+ "},{ \"dclNo\":\"5632\", \n" +
|
|
|
+ "\"borderPutrecNo\":\"46541231\", \n" +
|
|
|
+ "\"declareName\":\"送终鸡\",\n" +
|
|
|
+ " \"idCardNo\":\"452102896320147513\",\n" +
|
|
|
+ " \"borderTel\":\"12398524563\", \n" +
|
|
|
+ "\"groupId\":\"14\"\n" +
|
|
|
+ "}\n" +
|
|
|
+ "] }",RabbitMQ.ACC_KEY);
|
|
|
System.out.println("aes_cbc加密结果:" + cbcResult);
|
|
|
System.out.println();
|
|
|
|
|
|
System.out.println("---------解密CBC---------");
|
|
|
- String cbcDecrypt = decryptCBC(cbcResult, random);
|
|
|
+ String cbcDecrypt = decryptCBC(cbcResult, RabbitMQ.ACC_KEY);
|
|
|
System.out.println("aes解密结果:" + cbcDecrypt);
|
|
|
System.out.println();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|