From a12afa51056481e5485e790cb533d45636b87d09 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Thu, 24 Sep 2020 20:33:51 +0800 Subject: [PATCH] fix bug. --- protocol/crypto/crypto.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/crypto/crypto.go b/protocol/crypto/crypto.go index 6d521e7b..ea435785 100644 --- a/protocol/crypto/crypto.go +++ b/protocol/crypto/crypto.go @@ -68,8 +68,8 @@ func NewEncryptSession(t133 []byte) *EncryptSession { func (e *EncryptSession) DoEncrypt(d, k []byte) []byte { return binary.NewWriterF(func(w *binary.Writer) { encrypt := binary.NewTeaCipher(k).Encrypt(d) - w.WriteUInt16(uint16(len(k))) - w.Write(k) + w.WriteUInt16(uint16(len(e.T133))) + w.Write(e.T133) w.Write(encrypt) }) }