|
@@ -28,7 +28,14 @@ public class PrivacyAesUtil {
|
|
|
public final static String RESULT = "result";
|
|
|
public final static String SALT = "salt";
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description: 加密
|
|
|
+ * @param:
|
|
|
+ * @return:
|
|
|
+ * @author zhangyy
|
|
|
+ * @date: 2024/8/26 18:27
|
|
|
+ */
|
|
|
public static String encryptCBCPKCS5(String sSrc, String sKey,String ivKey) throws Exception {
|
|
|
if (sKey == null) {
|
|
|
System.out.print("Key为空null");
|
|
@@ -48,6 +55,13 @@ public class PrivacyAesUtil {
|
|
|
return encode(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @description: 解密
|
|
|
+ * @param:
|
|
|
+ * @return:
|
|
|
+ * @author zhangyy
|
|
|
+ * @date: 2024/8/26 18:27
|
|
|
+ */
|
|
|
public static String decryptAESCbc(String data, String key, String iv) throws Exception {
|
|
|
try {
|
|
|
|