This commit is contained in:
2023-06-08 11:50:06 +08:00
parent 7091a8ce23
commit 06cb41fff7
5 changed files with 18 additions and 21 deletions

View File

@@ -61,6 +61,7 @@ import org.springframework.util.StopWatch;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -237,7 +238,7 @@ public class SpringBootTestController {
String dataJson = JSONUtil.toJsonStr(data);
//加密
byte[] encryptText = Cryptos.aesEncrypt(dataJson.getBytes("UTF-8"),
byte[] encryptText = Cryptos.aesEncrypt(dataJson.getBytes(StandardCharsets.UTF_8),
OperatorSecret.getBytes(), OperatorSecret.getBytes());
String strData = Encodes.encodeBase64(encryptText);
@@ -293,7 +294,7 @@ public class SpringBootTestController {
String dataJson = JSONObject.toJSONString(json);
// 加密
byte[] encryptText = Cryptos.aesEncrypt(dataJson.getBytes("UTF-8"),
byte[] encryptText = Cryptos.aesEncrypt(dataJson.getBytes(StandardCharsets.UTF_8),
operatorSecret.getBytes(), operatorSecret.getBytes());
String strData = Encodes.encodeBase64(encryptText);
String timeStamp = DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS, new Date());