We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1、我将挑战码uint64类型转出[]byte,用的是大端转换的binary.Write(byteBuffer, binary.BigEndian, n)。。 func Int64ToByte(n uint64) []byte { byteBuffer := bytes.NewBuffer([]byte{}) binary.Write(byteBuffer, binary.BigEndian, n) return byteBuffer.Bytes() }
func CheckMD5(num uint64) []byte { h := md5.New() h.Write(Int64ToByte(num)) h.Write([]byte("xxx"))
return h.Sum(nil)
} 2、而ServerID 却必须用小端转换才能读取正确。。
不能统一成大端或小端吗? @idada
The text was updated successfully, but these errors were encountered:
你好,这个肯定是可以做到的,只要你把protocol.go文件里面的大小端格式替换一下就可以了。
Sorry, something went wrong.
No branches or pull requests
1、我将挑战码uint64类型转出[]byte,用的是大端转换的binary.Write(byteBuffer, binary.BigEndian, n)。。
func Int64ToByte(n uint64) []byte {
byteBuffer := bytes.NewBuffer([]byte{})
binary.Write(byteBuffer, binary.BigEndian, n)
return byteBuffer.Bytes()
}
func CheckMD5(num uint64) []byte {
h := md5.New()
h.Write(Int64ToByte(num))
h.Write([]byte("xxx"))
}
2、而ServerID 却必须用小端转换才能读取正确。。
不能统一成大端或小端吗?
@idada
The text was updated successfully, but these errors were encountered: