如何在使用 Dart Flutter 开发的应用程序中隐藏 OneSignal 密钥?
我正在使用 Dart Flutter 开发一个应用程序,我将在商店中发布这个应用程序。所以成千上万的人会使用这个应用程序。
我使用 OneSignal 为此应用程序设置了一个通知系统。但是,如果该应用程序的 APK 文件以某种方式获得访问权限并被解密,那么也会找到 OneSignal 密钥。
找到钥匙可能会带来可怕的后果。
对此我可以采取什么措施?如何隐藏密钥?
I am developing an app with Dart Flutter and I will publish this app in stores. So thousands of people will use this app.
I set up a notification system with OneSignal for this application.But if this app's APK file somehow gets access and is decrypted, the OneSignal key is also found.
Finding the key can have dire consequences.
What measures can I take for this? How can I hide the key?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般来说,您不应在应用程序中使用任何敏感数据。提供给 Flutter 的大多数密钥都是
Client
密钥,这意味着它比server
又名(秘密)的破坏性更小。正如我检查过的 OneSignal,它们仅向 Flutter SDK 提供可以保留的 Client_ID,并且应该在后端,必须受到安全保护。
您可能有两种方法来保护您的敏感数据:
您可以阅读更多内容 这里也。
Generally, you should not use any sensitive data in your application. Most of the keys provided to Flutter are
Client
keys, which means it's less destructive thanserver
aka (secrets).As I have checked
OneSignal,
they provide onlyClient_ID
to Flutter SDK which is ok to keep, and theREST_KEY
is supposed to be used in the backend and must be securely protected.You may have two ways to protect your sensitive data:
You can read more here too.