-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bind temporary and the permanent authorization key #14
Comments
This isn't working because you're not passing a long to the nonce parameter, but a random string. |
Do you mean this following code $nonce = \phpseclib\Crypt\Random::string(16);
$nonceToLong = $this->struct->unpack('<q', $nonce);
echo $nonceToLong; Fatal error: Uncaught exception 'danog\PHP\StructException' with message 'Length of given data (16) is different from length calculated using format string (8). |
@2012mjm You need to generate a random string of 8 bytes to convert it to a long |
|
this is ok |
I made it work. Yay! |
I have read here https://core.telegram.org/api/pfs and here https://core.telegram.org/method/auth.bindTempAuthKey for bind temporary and the permanent authorization key
I with respect to understanding the AuthKeyHandler class code wrote the following code
but the following error
because $nonce int128 type, but i want long type here
The text was updated successfully, but these errors were encountered: