From 50f6dd3b617f769e7fc6094c2dd0752747541489 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期四, 23 十一月 2023 18:04:05 +0800
Subject: [PATCH] 修复导出充值记录bug 优化充值记录加载逻辑和速度 优化导出记录逻辑

---
 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