简体   繁体   English

安全问题-在iOS中存储用户详细信息以及KeyChain中存储的最大数据量的最佳方法

[英]Security issue - Best way to store user details in iOS and max amount of data stored in KeyChain

I am making a app where I need to store some login details. 我正在制作一个需要存储一些登录详细信息的应用程序。

I searched over internet and found usage of NSUserDefaults has some security issue. 我通过互联网搜索,发现使用NSUserDefaults存在一些安全问题。

As for keychain , how much data can I store for a single app? 至于keychain ,一个应用程序可以存储多少数据?

The other option using sqlite also has some security issue. 使用sqlite的另一个选项也存在一些安全问题。

About application update, how can I preserve data in the next application update. 关于应用程序更新,如何在下次应用程序更新中保留数据。

So which one should I go for? 那我应该去哪一个呢?

NSUserDefaults is a big NO for storing any secure data. NSUserDefaults对于存储任何安全数据NSUserDefaults是一个大问题。

If it is only pertaining to user's username & password,ie sensitive information, then Keychain is the best thing to use. 如果它仅与用户的用户名和密码(即敏感信息)有关,那么Keychain是最好的选择。

For other kinds of data(not sensitive) you can use Core Data to store information. 对于其他类型的数据(不敏感),您可以使用Core Data来存储信息。

When an update takes place, you can explicitly copy data that is present & import it to your update. 更新发生后,您可以显式复制现有数据并将其导入更新。

Keychain data as such remains available to the app, after an update. 这样,更新后, Keychain数据仍可用于该应用程序。

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

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