1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

fix comment

This commit is contained in:
Mrs4s 2023-04-02 18:09:37 +08:00
parent 233e276d6a
commit 0f0e711111
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -30,7 +30,7 @@ func init() {
}
}
// sign t544 v8.9.35.10440
// sign t544 algorithm
// special thanks to the anonymous contributor who provided the algorithm
func sign(curr int64, input []byte) []byte {
curr %= 1000000
@ -60,10 +60,7 @@ func sign(curr int64, input []byte) []byte {
crcData[2] = 1
crcData[4] = 1
copy(crcData[5:9], kt[:4])
crcData[9] = byte(curr >> 24)
crcData[10] = byte(curr >> 16)
crcData[11] = byte(curr >> 8)
crcData[12] = byte(curr)
binary.BigEndian.PutUint32(crcData[9:13], uint32(curr))
copy(crcData[13:], result[:8])
calcCrc := tencentCrc32(&crc32Table, crcData[2:])
copy(kt[4+32:4+32+4], (*[4]byte)(unsafe.Pointer(&calcCrc))[:])