mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 15:00:38 +08:00
Specify class name output
This commit is contained in:
parent
ef7dd73dc0
commit
9db9be4fd4
@ -109,6 +109,7 @@ object CaptchaPacket : PacketFactory<CaptchaPacket.CaptchaResponse, CaptchaKey>(
|
|||||||
lateinit var captchaSectionN: IoBuffer
|
lateinit var captchaSectionN: IoBuffer
|
||||||
lateinit var captchaToken: IoBuffer//56bytes
|
lateinit var captchaToken: IoBuffer//56bytes
|
||||||
var transmissionCompleted: Boolean = false//验证码是否已经传输完成
|
var transmissionCompleted: Boolean = false//验证码是否已经传输完成
|
||||||
|
override fun toString(): String = "CaptchaResponse.Transmission"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,56 +77,20 @@ object SubmitPasswordPacket : PacketFactory<SubmitPasswordPacket.LoginResponse,
|
|||||||
}
|
}
|
||||||
|
|
||||||
sealed class LoginResponse : Packet {
|
sealed class LoginResponse : Packet {
|
||||||
data class KeyExchange(
|
class KeyExchange(
|
||||||
val tlv0006: IoBuffer,//120bytes
|
val tlv0006: IoBuffer,//120bytes
|
||||||
val tokenUnknown: ByteArray?,
|
val tokenUnknown: ByteArray?,
|
||||||
|
|
||||||
val privateKeyUpdate: PrivateKey//16bytes
|
val privateKeyUpdate: PrivateKey//16bytes
|
||||||
) : LoginResponse() {
|
) : LoginResponse() {
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun toString(): String = "LoginResponse.KeyExchange"
|
||||||
if (this === other) return true
|
|
||||||
if (other !is KeyExchange) return false
|
|
||||||
|
|
||||||
if (tlv0006 != other.tlv0006) return false
|
|
||||||
if (tokenUnknown != null) {
|
|
||||||
if (other.tokenUnknown == null) return false
|
|
||||||
if (!tokenUnknown.contentEquals(other.tokenUnknown)) return false
|
|
||||||
} else if (other.tokenUnknown != null) return false
|
|
||||||
if (privateKeyUpdate != other.privateKeyUpdate) return false
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
class CaptchaInit(
|
||||||
var result = tlv0006.hashCode()
|
|
||||||
result = 31 * result + (tokenUnknown?.contentHashCode() ?: 0)
|
|
||||||
result = 31 * result + privateKeyUpdate.hashCode()
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
data class CaptchaInit(
|
|
||||||
val captchaPart1: IoBuffer,
|
val captchaPart1: IoBuffer,
|
||||||
val token00BA: ByteArray,
|
val token00BA: ByteArray,
|
||||||
val unknownBoolean: Boolean
|
val unknownBoolean: Boolean
|
||||||
) : LoginResponse() {
|
) : LoginResponse() {
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun toString(): String = "LoginResponse.CaptchaInit"
|
||||||
if (this === other) return true
|
|
||||||
if (other !is CaptchaInit) return false
|
|
||||||
|
|
||||||
if (captchaPart1 != other.captchaPart1) return false
|
|
||||||
if (!token00BA.contentEquals(other.token00BA)) return false
|
|
||||||
if (unknownBoolean != other.unknownBoolean) return false
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
|
||||||
var result = captchaPart1.hashCode()
|
|
||||||
result = 31 * result + token00BA.contentHashCode()
|
|
||||||
result = 31 * result + unknownBoolean.hashCode()
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data class Success(
|
data class Success(
|
||||||
|
Loading…
Reference in New Issue
Block a user