feat: 大幅提升语音解密速度;优化引导页面;优化图片密钥扫描逻辑

This commit is contained in:
cc
2026-01-25 14:25:24 +08:00
parent 16cbc6adb1
commit 1d9e8aded0
10 changed files with 942 additions and 10472 deletions

View File

@@ -20,6 +20,7 @@ export class WcdbCore {
private currentWxid: string | null = null
// 函数引用
private wcdbInitProtection: any = null
private wcdbInit: any = null
private wcdbShutdown: any = null
private wcdbOpenAccount: any = null
@@ -243,6 +244,18 @@ export class WcdbCore {
this.lib = this.koffi.load(dllPath)
// InitProtection (Added for security)
try {
this.wcdbInitProtection = this.lib.func('bool InitProtection(const char* resourcePath)')
const protectionOk = this.wcdbInitProtection(dllDir)
if (!protectionOk) {
console.error('Core security check failed')
return false
}
} catch (e) {
console.warn('InitProtection symbol not found:', e)
}
// 定义类型
// wcdb_status wcdb_init()
this.wcdbInit = this.lib.func('int32 wcdb_init()')