From c3edd4a3122b711bc6a0bfef56b6ff6bf5ae03e2 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期二, 13 五月 2025 09:09:23 +0800
Subject: [PATCH] feat(generallibrary): 优化用户开卡流程并添加支付方式功能

---
 generallibrary/src/main/cpp/general-native-lib.cpp |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/generallibrary/src/main/cpp/general-native-lib.cpp b/generallibrary/src/main/cpp/general-native-lib.cpp
index cf264e2..e961a69 100644
--- a/generallibrary/src/main/cpp/general-native-lib.cpp
+++ b/generallibrary/src/main/cpp/general-native-lib.cpp
@@ -39,7 +39,8 @@
     0x8E, 0x93, 0xB5, 0x44, 0x8D, 0x42, 0x22, 0x84, 0x95, 0x33, 0x22, 0x93,
     0x42, 0x82, 0xA3, 0x35, 0x91, 0x33, 0x13, 0x93, 0x71, 0x21, 0x01, 0x71,
     0x37, 0x9F, 0xA6, 0x68, 0x92, 0x86, 0x46, 0x72, 0x43, 0x62, 0x12, 0x52,
-    0x5D, 0x85, 0x93, 0x86, 0x82, 0x46, 0x31, 0x86, 0x57, 0x48, 0x16, 0x88,
+    // 鎵囧尯14瀵嗙爜 (鍩轰簬鎵囧尯13鐨刋OR瀵嗛挜閲嶆柊璁$畻涓�27562CCFE9F7)
+    0x5D, 0xE5, 0x93, 0x86, 0x82, 0x46, 0x31, 0x86, 0x57, 0x48, 0x16, 0x88,
     0x97, 0x73, 0xB5, 0x47, 0x95, 0x55, 0x36, 0x69, 0x49, 0x58, 0x18, 0x6A,
     0xEA, 0x46, 0x84, 0x93, 0x82, 0x19, 0x29, 0x91, 0x31, 0x1C, 0x0C, 0x7D
 };
@@ -95,19 +96,19 @@
         return nullptr;
     }
 
-//    __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Decrypting sector %d", sector);
-//    __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Encrypted data: %02X %02X %02X %02X %02X %02X",
-//                       encrypted_data[0], encrypted_data[1], encrypted_data[2],
-//                       encrypted_data[3], encrypted_data[4], encrypted_data[5]);
-//    __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Using XOR key: %02X %02X %02X %02X %02X %02X",
-//                       XOR_KEYS[sector][0], XOR_KEYS[sector][1], XOR_KEYS[sector][2],
-//                       XOR_KEYS[sector][3], XOR_KEYS[sector][4], XOR_KEYS[sector][5]);
+    __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Decrypting sector %d", sector);
+    __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Encrypted data: %02X %02X %02X %02X %02X %02X",
+                       encrypted_data[0], encrypted_data[1], encrypted_data[2],
+                       encrypted_data[3], encrypted_data[4], encrypted_data[5]);
+    __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Using XOR key: %02X %02X %02X %02X %02X %02X",
+                       XOR_KEYS[sector][0], XOR_KEYS[sector][1], XOR_KEYS[sector][2],
+                       XOR_KEYS[sector][3], XOR_KEYS[sector][4], XOR_KEYS[sector][5]);
 
     unsigned char decrypted[6];
     for (int i = 0; i < 6; i++) {
         decrypted[i] = encrypted_data[i] ^ XOR_KEYS[sector][i];
-//        __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Byte %d: %02X ^ %02X = %02X",
-//                          i, encrypted_data[i], XOR_KEYS[sector][i], decrypted[i]);
+        __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Byte %d: %02X ^ %02X = %02X",
+                          i, encrypted_data[i], XOR_KEYS[sector][i], decrypted[i]);
     }
 
     std::string result;
@@ -118,7 +119,7 @@
         result += hex;
     }
 
-//    __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Decrypted result: %s", result.c_str());
+    __android_log_print(ANDROID_LOG_INFO, "GeBaseHelper", "Decrypted result: %s", result.c_str());
     return env->NewStringUTF(result.c_str());
 }
 
@@ -239,7 +240,7 @@
 
         // 瑙e瘑骞惰浆鎹㈡瘡涓墖鍖哄瘑閽�
         for (size_t i = 0; i < numKeys; i++) {
-//            __android_log_print(ANDROID_LOG_DEBUG, "M1Card", "澶勭悊鎵囧尯 %zu 鐨勫瘑閽�", i);
+           __android_log_print(ANDROID_LOG_DEBUG, "M1Card", "澶勭悊鎵囧尯 %zu 鐨勫瘑閽�", i);
             
             // 纭繚涓嶄細瓒婄晫璁块棶
             if (i * 12 + 6 > sizeof(ENCRYPTED_SECTOR_KEYS)) {
@@ -251,7 +252,7 @@
             jstring decrypted_str = decrypt_key(env, ENCRYPTED_SECTOR_KEYS + (i * 12), 6);
             
             if (!decrypted_str) {
-//                __android_log_print(ANDROID_LOG_ERROR, "M1Card", "Failed to decrypt key for sector %zu", i);
+               __android_log_print(ANDROID_LOG_ERROR, "M1Card", "Failed to decrypt key for sector %zu", i);
                 continue;
             }
             

--
Gitblit v1.8.0