Telegram tdlib Android : 如何存储 apd 和 appyash?

Telegram TDLib Android : How to store apiId and apiHash?

我正在尝试使用著名的 TDLib 构建一个 android 电报客户端。不幸的是,我在 android 中找不到任何关于使用这个库的好教程或文档。但是,我从 Java 示例中了解了库的工作原理。

问题是在实现库时,我必须将 api_idapi_hash 传递给 TDLib。我认为这些变量一定是其他人不知道的,因为这可以被重新用于恶意目的。

由于文档未提供有关存储 api_idapi_hash 的任何最佳实践,我如何才能让 public 无法使用它们并在 android应用程序?

From the developer of TDLib

On Android the values can't be accessed without root permissions if they are stored in any reasonable way. From the other side, they can be extracted from the app's memory with root permissions. So you can't do much besides storing them in the apps binary and obfuscating them in any simple way.

他说,如果有人提取密钥并将其用于恶意目的,只有用户会被阻止