Closed Cosmos-Tech closed 6 years ago
@Cosmos-Tech access_hash is long value, in 32bit system shown string that have symboles. u should use 64bit system to return true long value.
Thanks @wecanco, But on 32-bit, How MadelineProto handle it, because application worked correctly?
@Cosmos-Tech 32bit php handle this value and convert it.
Thanks @wecanco, But i need to known How 32bit php do it.
@Cosmos-Tech i dont know how to handle it. but this link mabye help u: https://stackoverflow.com/a/2842548
On 32 bit systems, MadelineProto handles 64 bit numbers as base256 numbers (aka strings, or binary numbers). Since usually there is no need to do any arithmetical manipulations to the 64 bit access hashes, MadelineProto stores and sends directly the string versions of these numbers. I suggest you store access hashes using the mysql BYTE datatype, or, if you have a 64 bit system, as BIGINT.
Hi dears, I read doc.
Constructor::user access_hash is long [BigInteger -> phpseclib\Math]
When I use get_pwr_chat to get participants info: access_hash returned is string type with cp1256 encoding [contains special symbols]
I need save access_hash in database (mysql utf8) to reused.
How can i convert access_hash [string] to long type or Or vice versa?
Thanks