fix bkn calculate error.

close #671
This commit is contained in:
jihuayu 2020-12-18 18:25:34 +08:00 committed by Karlatemp
parent a5e9bef3b6
commit 17a223d9ce
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -111,6 +111,7 @@ internal class QQAndroidBot constructor(
val bkn: Int
get() = client.wLoginSigInfo.sKey.data
.fold(5381) { acc: Int, b: Byte -> acc + acc.shl(5) + b.toInt() }
.and(Int.MAX_VALUE)
}
internal val EMPTY_BYTE_ARRAY = ByteArray(0)