From d42c37832a01409dbe8b7cb6b725e2c0f0aa4be7 Mon Sep 17 00:00:00 2001 From: danogentili Date: Sat, 6 Aug 2016 00:43:36 +0200 Subject: [PATCH] Update --- mtproto.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtproto.php b/mtproto.php index 3abdd0e2..f611e06a 100755 --- a/mtproto.php +++ b/mtproto.php @@ -276,9 +276,9 @@ class Session assert($this->PrimeModule->isPrime($dh_prime)); $retry_id = 0; $b_str = \phpseclib\Crypt\Random::string(256); - $b = $this->struct->unpack(">Q", ($b_str); + $b = $this->struct->unpack(">Q", $b_str); $g_b = pow($g, $b, $dh_prime); - $g_b_str = $this->struct->pack(">Q", ($g_b); + $g_b_str = $this->struct->pack(">Q", $g_b); $data = serialize_obj(['client_DH_inner_data'], ['nonce' => $nonce, 'server_nonce' => $server_nonce, 'retry_id' => $retry_id, 'g_b' => $g_b_str]); $data_with_sha = sha1($data, true) . $data; $data_with_sha_padded = $data_with_sha . \phpseclib\Crypt\Random::string(posmod(-strlen($data_with_sha), 16));