From a6fdb620fa48f6c78f066d8e01b69d2570d3baa7 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期三, 22 十一月 2023 17:43:45 +0800
Subject: [PATCH] 修改初始密码 首页添加联网状态 调整联网loding动画

---
 app/src/main/java/com/dayu/recharge/tools/BaseNFCHelper.java |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/app/src/main/java/com/dayu/recharge/tools/BaseNFCHelper.java b/app/src/main/java/com/dayu/recharge/tools/BaseNFCHelper.java
index 77e1c11..806ebed 100644
--- a/app/src/main/java/com/dayu/recharge/tools/BaseNFCHelper.java
+++ b/app/src/main/java/com/dayu/recharge/tools/BaseNFCHelper.java
@@ -20,9 +20,18 @@
  */
 public class BaseNFCHelper {
     /**
-     * 榛樿瀵嗙爜
+     * 榛樿瀵嗙爜锛堢櫧鍗″瘑鐮侊級
      */
-    public byte[] bytes;
+    public byte[] defauleKey;
+
+    /**
+     * 鍏徃瀵嗙爜
+     */
+    public byte[] companyKey;
+
+    String companyKeyA;
+    String companyKeyB;
+
 
     public BaseNFCHelper() {
         // 瑙e瘑瀛楃涓�
@@ -33,7 +42,17 @@
             cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(encodedKey, "AES"));
             byte[] decryptedBytes = cipher.doFinal(encryptedBytes);
             String decryptedText = new String(decryptedBytes, StandardCharsets.UTF_8);
-            bytes = HexUtil.hexToByteArray(decryptedText);
+            defauleKey = HexUtil.hexToByteArray(decryptedText);
+
+            byte[] encryptedBytes2 = Base64.decode("aYC9feYEOFOQHuzflLIXSw==", Base64.DEFAULT);
+            byte[] decryptedBytes2 = cipher.doFinal(encryptedBytes2);
+            companyKeyA = new String(decryptedBytes2, StandardCharsets.UTF_8);
+            companyKey = HexUtil.hexToByteArray(companyKeyA);
+
+            byte[] encryptedBytes3 = Base64.decode("n+SSZFb4DHsreVav/Z5ftg==", Base64.DEFAULT);
+            byte[] decryptedBytes3 = cipher.doFinal(encryptedBytes3);
+            companyKeyB = new String(decryptedBytes3, StandardCharsets.UTF_8);
+
         } catch (NoSuchAlgorithmException e) {
             throw new RuntimeException(e);
         } catch (NoSuchPaddingException e) {

--
Gitblit v1.8.0