gpt4 book ai didi

android - Telegram TDLib Android : How to store apiId and apiHash?

转载 作者:行者123 更新时间:2023-12-04 10:13:54 25 4
gpt4 key购买 nike

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

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

由于文档没有提供任何关于存储 api_idapi_hash 的最佳实践,我怎样才能让它们对公众不可用并在 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.

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

关于android - Telegram TDLib Android : How to store apiId and apiHash?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61174809/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com