mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-07 12:43:32 +08:00
fix encrypt.
This commit is contained in:
parent
9ff687514e
commit
2e45f82d6a
@ -67,12 +67,10 @@ func NewEncryptSession(t133 []byte) *EncryptSession {
|
||||
|
||||
func (e *EncryptSession) DoEncrypt(d, k []byte) []byte {
|
||||
return binary.NewWriterF(func(w *binary.Writer) {
|
||||
w.WriteByte(0x01)
|
||||
w.WriteByte(0x03)
|
||||
encrypt := binary.NewTeaCipher(k).Encrypt(d)
|
||||
w.WriteUInt16(uint16(len(k)))
|
||||
w.Write(k)
|
||||
w.WriteUInt16(258)
|
||||
w.WriteUInt16(0)
|
||||
w.EncryptAndWrite(k, d)
|
||||
w.Write(encrypt)
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user