Преглед изворни кода

[功能修复]固定秘钥

liuf пре 1 година
родитељ
комит
7f49201b4c

+ 9 - 6
src/main/java/com/tmzn/devicelinkykc/frameMsg/frameType/LoginFrame.java

@@ -133,14 +133,17 @@ public class LoginFrame {
     }
 
     private byte[] loginMsg18( Device device) throws Exception {
-        Random random = new Random();
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < 16; i++) {
-            sb.append(random.nextInt(10));
-        }
+//        Random random = new Random();
+//        StringBuilder sb = new StringBuilder();
+//        for (int i = 0; i < 16; i++) {
+//            sb.append(random.nextInt(10));
+//        }
         byte[] msg = new byte[127];//消息体
         // 密钥
-        String str_key = sb.toString();
+//        String str_key = sb.toString();
+
+        String str_key = "6492806831843423";
+
         //当前通讯的密钥缓存到redis
         //20240627:要求对接其他按云快充对接的
         GdDispostion dispostionServiceById = gdDispostionService.getById(device.getOperatorsId());