[英]Is there a more secure container than NSUserDefaults for persisting shared data between an app and an extension?
Is there a more secure container than NSUserDefaults for persisting shared data between an app and an extension? 是否有比NSUserDefaults更安全的容器来持久保存应用程序和扩展之间的共享数据?
As I understand it the contents are stored in plain text. 据我了解,内容以纯文本格式存储。
If you are looking for secure location to store data you should check out NSKeyChain 如果您正在寻找用于存储数据的安全位置,则应签出NSKeyChain
The keychain is a highly secure storage location for user names, passwords, logon tokens, secret keys, etc. Apple preview KeychainWrapper class which allow you to access it easily, in very similar way you do with NSUserDefaults. 钥匙串是用户名,密码,登录令牌,秘密密钥等的高度安全的存储位置。Apple预览KeychainWrapper类使您可以轻松访问它,就像使用NSUserDefaults一样。 Keychain is C api so it's fast.
钥匙串是C api,因此速度很快。
I don't know your app requirements, but if you are planing to store lots of data DON'T use keychain. 我不知道您对应用程序的要求,但是如果您打算存储大量数据,请不要使用钥匙串。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.