我必须将我的应用程序的私钥存储在 android 设备中的安全位置,我阅读了有关 certStore 的信息,但它不允许在其中存储文件。是否有任何位置可以安全地存储它并且如果重新安装应用程序也不会被删除。
问问题
2814 次
1 回答
1
You can store the key in the Preferences of your App. This will protect the key from
getting read by other applications because of the underlying file system restrictions of
the Android system.
但这不会保护密钥不被用户自己读取。
如果您想在删除应用程序并再次安装到设备后使用此共享首选项,请尝试使用 Android 备份管理器。我认为它可以帮助您重新安装活动数据。
EDIT: Android (unfortunately) does not provide a way to do so. The approach I've used
before is to encrypt this token with another key generated within the app.
Your app key can be algorithmically generated. This, however, is only as secure as
your algorithm. Once that is known this is equivalent to storing the token in plain text.
谢谢。
于 2011-09-17T06:11:26.380 回答