Android 上是否有相当于 iOS 钥匙串的用户凭据?
Android 上有类似 iOS 钥匙串的东西吗?
我对Preferences API的理解是它没有加密。对于我的应用程序来说,这些凭据是否跨设备保留并不重要(即与 Android 中类似 iPhone 的钥匙串?)
我还研究了 KeyStore API,但它似乎将用户凭据的实际存储留给了应用程序开发人员。
Is there an equivalent to iOS's Keychain on Android?
My understanding of the Preferences API is that it is not encrypted. For my application it doesn't matter whether these credentials are persisted across devices (i.e. a different use-case to iPhone-like Keychain in Android?)
I also looked at the KeyStore API but it seems to leave the actual storage of user credentials up to the application developer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
扩展@DJPlayer 的答案:
一些相关文章。第三个包括一个 github 应用程序,演示如何使用密钥库提供程序生成密钥,然后加密字符串。
另请参阅 Android 存储选项 有关存储加密密码的方法 - 我的建议是共享首选项。
请注意,根据具有 root 访问权限的第二篇文章,并且了解您的应用程序如何使用密钥库(可以通过反编译您的 apk 获得),可以劫持私钥并使用它来解密加密材料(例如:保留的密码)
Expanding upon @DJPlayer's answer:
Some relevant articles. The third includes a github app that demonstrates using the keystore provider to generate keys and then encrypt strings.
Also see Android Storage Options for ways to store the encrypted password - my recommendation is Shared Preferences.
Note that according to the second article with root access and a bit of knowledge of how your app uses the keystore (which might be obtainable from decompiling your apk), it's possible to hijack the private key and use it to decrypt encrypted material (ex: the persisted password)
http://developer.android.com/reference/android/security/KeyChain.html
OS 4.0 的钥匙串
http://developer.android.com/reference/android/security/KeyChain.html
Keychain for OS 4.0
简短的回答,没有。但您可以期望文件系统是安全的。
每个应用程序在不同的用户下运行,用于存储应用程序数据的文件系统受到普通 UNIX 用户权限的保护。因此,每个应用程序的文件访问默认情况下都是沙盒的。文件系统也可以被加密。
开发人员网站的此页面对此进行了更好的解释: http://developer.android.com /guide/topics/security/security.html
Short answer, there isn't one. But you can expect the filesystem to be secure.
Each app operates under a different user, and the filesystem used to store app data is secured by normal UNIX user permissions. So each app's file access is sandboxed by default. The filesystem also may be encrypted.
This page from the developer's site explains it better: http://developer.android.com/guide/topics/security/security.html
其实有:
https://developers.google.com/identity/smartlock-passwords/android/
Actually there is:
https://developers.google.com/identity/smartlock-passwords/android/