fix(sdk-core): 修复编译错误 — KDoc 转义 + MasterKeys API

- ConfigFileReader: KDoc 中 *.xuqmconfig 改为 \*.xuqmconfig(避免 */ 被解析为注释结束)
- ConfigCache: MasterKey → MasterKeys(兼容当前 security-crypto 版本)

Co-Authored-By: Claude <noreply@anthropic.com>
这个提交包含在:
XuqmGroup 2026-06-18 16:04:57 +08:00
父节点 b7c7a2c385
当前提交 2c610b777d
共有 2 个文件被更改,包括 5 次插入5 次删除

查看文件

@ -3,7 +3,7 @@ package com.xuqm.sdk.internal
import android.content.Context
import android.util.Log
import androidx.security.crypto.EncryptedSharedPreferences
import androidx.security.crypto.MasterKey
import androidx.security.crypto.MasterKeys
import java.security.MessageDigest
/**
@ -80,9 +80,9 @@ internal object ConfigCache {
}
private fun getPrefs(context: Context) = EncryptedSharedPreferences.create(
context,
PREFS_NAME,
MasterKey.Builder(context).setKeyScheme(MasterKey.KeyScheme.AES256_GCM).build(),
MasterKeys.getOrCreate(MasterKeys.AES256_GCM_SPEC),
context,
EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM,
)

查看文件

@ -9,9 +9,9 @@ import com.google.gson.Gson
*
* 搜索顺序对齐 RN SDK src/assets/config/
* 1. assets/config/config.xuqmconfig config.xuqm
* 2. assets/config/*.xuqmconfig取第一个
* 2. assets/config/\*.xuqmconfig取第一个
* 3. assets/xuqm/config.xuqm旧路径兼容
* 4. assets/xuqm/*.xuqmconfig旧路径兼容
* 4. assets/xuqm/\*.xuqmconfig旧路径兼容
*
* 缓存策略
* - [readRawBytes]只读取文件原始字节不做解密主线程安全<5ms