You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use JSON interface to interact with tdlib and with some keys (for example, changeme123 :) ) checkDatabaseEncryptionKey method returns Failed to parse JSON object as TDLib request: Wrong padding length (checked with tdlib v1.6.0):
{
"@type": "error",
"code": 400,
"message": "Failed to parse JSON object as TDLib request: Wrong padding length"
}
Should encryption_key be passed as a base64 encoded string? I see this message in tdlib in base64 related code. Also, in td_api.tlencryption_key parameter has type bytes, but in the documentation it's string.
Also, the python example uses key parameter, not encryption_key. Which one is correct?
Thank you.
The text was updated successfully, but these errors were encountered:
Should encryption_key be passed as a base64 encoded string?
Yes, in JSON interface there is no way to pass arbitrary binary data, so all bytes fields must be encoded with base64.
Also, in td_api.tl encryption_key parameter has type bytes, but in the documentation it's string.
The documentation available on-site is generated for native C++ interface, which uses std::string for arbitrary binary strings of type bytes. I will try to fix this and to keep in the documentation the difference between string and bytes.
Also, the python example uses key parameter, not encryption_key. Which one is correct?
The Python example is incorrect. Thanks for noticing this. I will fix the example.
Hello,
I use JSON interface to interact with tdlib and with some keys (for example,
changeme123
:) )checkDatabaseEncryptionKey
method returnsFailed to parse JSON object as TDLib request: Wrong padding length
(checked with tdlib v1.6.0):Should
encryption_key
be passed as a base64 encoded string? I see this message in tdlib in base64 related code. Also, in td_api.tlencryption_key
parameter has typebytes
, but in the documentation it's string.Also, the python example uses
key
parameter, notencryption_key
. Which one is correct?Thank you.
The text was updated successfully, but these errors were encountered: