Remove unused EncryptServiceContext value and pass QUA

All final value only need to passed to initialize method
This commit is contained in:
sandtechnology 2023-06-29 13:55:37 +08:00 committed by Karlatemp
parent 19132b359b
commit 8af6c3fcf6
No known key found for this signature in database
GPG Key ID: BA173CA2B9956C59
2 changed files with 3 additions and 12 deletions

View File

@ -125,6 +125,7 @@ internal class EcdhInitialPublicKeyUpdaterImpl(
set(EncryptServiceContext.KEY_DEVICE_INFO, bot.client.device)
set(EncryptServiceContext.KEY_BOT_PROTOCOL, bot.configuration.protocol)
set(EncryptServiceContext.KEY_QIMEI36, bot.client.qimei36 ?: "")
set(EncryptServiceContext.KEY_APP_QUA, "V1_AND_SQ_8.9.58_4106_YYB_D") // 8.9.58
set(EncryptServiceContext.KEY_BOT_WORKING_DIR, bot.configuration.workingDirPath)
set(EncryptServiceContext.KEY_BOT_CACHING_DIR, bot.configuration.actualCacheDir().absolutePath)
}))

View File

@ -137,12 +137,7 @@ internal fun <R : Packet?> buildRawUniPacket(
val signDataPacket = if (encryptWorker != null) {
val signResult = encryptWorker.qSecurityGetSign(
EncryptServiceContext(client.uin, buildTypeSafeMap {
set(EncryptServiceContext.KEY_APP_QUA, "V1_AND_SQ_8.9.58_4106_YYB_D") // 8.9.58
set(EncryptServiceContext.KEY_CHANNEL_PROXY, createChannelProxy(client.bot))
set(EncryptServiceContext.KEY_DEVICE_INFO, client.device)
set(EncryptServiceContext.KEY_QIMEI36, client.qimei36 ?: "")
}),
EncryptServiceContext(client.uin),
sequenceId,
commandName,
bodyBytes
@ -376,12 +371,7 @@ internal fun BytePacketBuilder.writeSsoPacket(
val reserveField = if (encryptWorker != null) {
val signResult = encryptWorker.qSecurityGetSign(
EncryptServiceContext(client.uin, buildTypeSafeMap {
set(EncryptServiceContext.KEY_APP_QUA, "V1_AND_SQ_8.9.58_4106_YYB_D") // 8.9.58
set(EncryptServiceContext.KEY_CHANNEL_PROXY, createChannelProxy(client.bot))
set(EncryptServiceContext.KEY_DEVICE_INFO, client.device)
set(EncryptServiceContext.KEY_QIMEI36, client.qimei36 ?: "")
}),
EncryptServiceContext(client.uin),
sequenceId,
commandName,
bodyBytes