From 7c1335ff559c08bbcef479bd2b01a08a1f4e55f2 Mon Sep 17 00:00:00 2001 From: guyue <1721849008@qq.com> Date: 星期五, 15 八月 2025 10:59:18 +0800 Subject: [PATCH] 增加json时区,修付开始采集状态,修改导出校验 --- src/main/java/com/linghu/utils/OpenCryptUtil.java | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/linghu/utils/OpenCryptUtil.java b/src/main/java/com/linghu/utils/OpenCryptUtil.java index 8bef420..21e1d33 100644 --- a/src/main/java/com/linghu/utils/OpenCryptUtil.java +++ b/src/main/java/com/linghu/utils/OpenCryptUtil.java @@ -14,19 +14,12 @@ @Component public class OpenCryptUtil { - // 加密密钥(从配置文件读取,避免硬编码) - @Value("${crypt.secret}") // 长度需符合算法要求(如AES-256需32位) - private String secret; - // 初始化向量(CBC模式需要,可选) -// @Value("${app.crypt.iv:1234567890abcdef}") // 16位(AES-128/256通用) -// private String iv; // 初始化加密配置(若需要) @PostConstruct public void init() { - // 若 open-crypt 需要初始化,可在此处处理 - // 例如:CryptoUtils.init(secretKey, iv); + } /** @@ -35,14 +28,11 @@ public String encrypt(String user) { try { // 调用 open-crypt 的加密方法(根据实际API调整) - //user转为 json -// String json = JSON.toJSONString(user); - String secret ="fY9tX7vX7qH5bN2cD8eM4xD2fH7UL4xM"; + String secret="fY9tX7vX7qH5bN2cD8eM4xD2fH7uL4xM"; JSONObject geoJSON = new JSONObject(); geoJSON.put("name",user); String token = UserSign.gen(geoJSON.toJSONString(),secret.getBytes(StandardCharsets.UTF_8)); return token; -// return UserSign.gen(user, "fY9tX7vX7qH5bN2cD8eM4xD2fH7uL4xM".getBytes(StandardCharsets.UTF_8)); } catch (Exception e) { throw new RuntimeException("加密失败:" + e.getMessage(), e); } -- Gitblit v1.7.1