mtproto,rpc: support Android legacy startup
(cherry picked from commit 06b6ae2bb2f90bd7cc1d6a8404a82aff507e6821)
This commit is contained in:
parent
6dc42942c8
commit
b435784809
9 changed files with 361 additions and 17 deletions
|
|
@ -104,11 +104,16 @@ func sendEncryptedWithSeq(t *testing.T, conn transport.Conn, cipher crypto.Ciphe
|
|||
}
|
||||
|
||||
func sendEncryptedWithSaltAndSeq(t *testing.T, conn transport.Conn, cipher crypto.Cipher, auth exchange.ClientExchangeResult, salt, msgID int64, seqNo int32, body []byte) {
|
||||
t.Helper()
|
||||
sendEncryptedWithSessionSaltAndSeq(t, conn, cipher, auth, auth.SessionID, salt, msgID, seqNo, body)
|
||||
}
|
||||
|
||||
func sendEncryptedWithSessionSaltAndSeq(t *testing.T, conn transport.Conn, cipher crypto.Cipher, auth exchange.ClientExchangeResult, sessionID, salt, msgID int64, seqNo int32, body []byte) {
|
||||
t.Helper()
|
||||
var buf bin.Buffer
|
||||
if err := cipher.Encrypt(auth.AuthKey, crypto.EncryptedMessageData{
|
||||
Salt: salt,
|
||||
SessionID: auth.SessionID,
|
||||
SessionID: sessionID,
|
||||
MessageID: msgID,
|
||||
SeqNo: seqNo,
|
||||
MessageDataLen: int32(len(body)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue