of code from the source code of Telegram desktop?
auto hashEncrypted = QByteArray::fromBase64(hash.toLatin1(), QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals);
Hash is a string with 43 characters, for example MD3yTBGxeGpKkMn6DdszPmnIXGGZVYpaVEmMV4p5mlE
https://github.com/telegramdesktop/tdesktop/blob/958d55a594364cb92debc1aeb4ea158f9107f0a4/Telegram/SourceFiles/boxes/share_box.cpp#L904
seems that it makes base64 to binary data conversion
hashEncrypted = QByteArray.fromBase64(hash.toLatin1(), QByteArray.Base64UrlEncoding or QByteArray.OmitTrailingEquals) this should work in python hash is a QString so the toLatin1() should work too...not sure about the or part though...might work
Обсуждают сегодня