mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-18 12:07:01 +08:00
实现图片解密设置页
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
export type ImageKeySource = 'secure-storage' | 'legacy-settings' | 'environment' | 'none'
|
||||
export type ImageResourceState = 'available' | 'unavailable' | 'unknown'
|
||||
|
||||
export interface ImageKeyConfigResult {
|
||||
success: boolean
|
||||
configured: boolean
|
||||
saved: boolean
|
||||
encryptionAvailable: boolean
|
||||
source: ImageKeySource
|
||||
accountId?: string
|
||||
resourceRoot: string
|
||||
xorKey?: string
|
||||
aesKey?: string
|
||||
updatedAt?: number
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface ImageResourceCheck {
|
||||
state: ImageResourceState
|
||||
detail: string
|
||||
}
|
||||
|
||||
export interface ImageDecryptionStatus {
|
||||
configured: boolean
|
||||
saved: boolean
|
||||
encryptionAvailable: boolean
|
||||
source: ImageKeySource
|
||||
accountId?: string
|
||||
resourceRoot: string
|
||||
updatedAt?: number
|
||||
platform: NodeJS.Platform
|
||||
autoDetectSupported: boolean
|
||||
wechatRunning: boolean
|
||||
accountIdentified: boolean
|
||||
cacheState: 'normal' | 'unavailable'
|
||||
resources: {
|
||||
imageIndex: ImageResourceCheck
|
||||
imageDirectory: ImageResourceCheck
|
||||
thumbnail: ImageResourceCheck
|
||||
original: ImageResourceCheck
|
||||
sticker: ImageResourceCheck
|
||||
video: ImageResourceCheck
|
||||
}
|
||||
}
|
||||
|
||||
export interface SaveImageKeyRequest {
|
||||
resourceRoot: string
|
||||
xorKey: string
|
||||
aesKey: string
|
||||
}
|
||||
|
||||
export interface TestImageDecryptionRequest extends SaveImageKeyRequest {
|
||||
userMd5: string
|
||||
}
|
||||
|
||||
export interface ImageDecryptionTestResult {
|
||||
success: boolean
|
||||
code?:
|
||||
| 'NOT_CONFIGURED'
|
||||
| 'NO_CONVERSATION'
|
||||
| 'NO_IMAGE_MESSAGE'
|
||||
| 'FILE_NOT_FOUND'
|
||||
| 'DECRYPT_FAILED'
|
||||
| 'ACCOUNT_MISMATCH'
|
||||
| 'UNKNOWN'
|
||||
error?: string
|
||||
fileFound: boolean
|
||||
decrypted: boolean
|
||||
readable: boolean
|
||||
isThumbnail?: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user