简体   繁体   English

可以安全地将数据存储在钥匙串中吗?

[英]Safe to to store data in the keychain?

I'm developing an application for iOS and macOS, and I needed to store a hash value in the keychain. 我正在开发适用于iOS和macOS的应用程序,并且需要将哈希值存储在钥匙串中。 I noticed from a couple of different places including Apple, that a user can reset a keychain or create a new one. 我从包括苹果在内的两个不同的地方注意到,用户可以重置钥匙串或创建新的钥匙串。 If they reset this will it also remove items that my application has saved in there? 如果他们重置此设置,是否还会删除我的应用程序已保存在其中的项目?

On MacOS users can see keychain values, modify them and delete them using the keychain utility. 在MacOS上,用户可以使用钥匙串实用程序查看,修改和删除钥匙串值。 They can also replace the current keychain with a new, empty, keychain but this would be very disruptive to the user as every stored password and other items such as certificates would now be in th sold keychain file which is not accessible to applications. 他们还可以用新的空钥匙串替换当前的钥匙串,但这对用户来说将是非常破坏性的,因为每个存储的密码和其他项目(例如证书)现在都将位于已出售的钥匙串文件中,应用程序无法访问。

On iOS there is no direct keychain access on a non-jail broken device, but as of 10.3 if an app is deleted, its keychain items are removed. 在iOS上,没有牢狱之灾的设备上没有直接的钥匙串访问权限,但是从10.3开始,如果删除了某个应用程序,则会删除其钥匙串项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM