1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-06-19 14:05:04 +08:00
This commit is contained in:
Mrs4s 2020-09-24 20:33:51 +08:00
parent 2e45f82d6a
commit a12afa5105

View File

@ -68,8 +68,8 @@ func NewEncryptSession(t133 []byte) *EncryptSession {
func (e *EncryptSession) DoEncrypt(d, k []byte) []byte { func (e *EncryptSession) DoEncrypt(d, k []byte) []byte {
return binary.NewWriterF(func(w *binary.Writer) { return binary.NewWriterF(func(w *binary.Writer) {
encrypt := binary.NewTeaCipher(k).Encrypt(d) encrypt := binary.NewTeaCipher(k).Encrypt(d)
w.WriteUInt16(uint16(len(k))) w.WriteUInt16(uint16(len(e.T133)))
w.Write(k) w.Write(e.T133)
w.Write(encrypt) w.Write(encrypt)
}) })
} }