我需要在整个应用程序中维护我的登录凭据,所以,我有3个选项来维护我的登录凭据...
I need to maintain my log-in credential for throughout the app so, I have 3 options to maintain my log-in credentials...
1 key chain 2 NSUserDefaults 3 plist哪一个最好选择? 有没有其他方法可以存储登录凭据?
Which one is best one to choose ? Is there any other way is there to store the log-in credentials?
提前致谢
推荐答案我建议存储钥匙串登录凭据由于其提供的安全功能。 iOS上的钥匙串服务提供了一种安全存储密码,密钥,证书等内容的方法。
I'll suggest keychain for storing the login credentials due to the security feature it provides. The keychain services on iOS provide a means to securely store content such as passwords, keys, certificates, etc.
应存储密码和密钥等敏感数据在钥匙串。 Apple的钥匙串服务编程指南指出
Sensitive data like passwords and keys should be stored in the Keychain. Apple's Keychain Services Programming Guide states that
钥匙串是一个加密容器,用于存放多个密码应用程序和安全服务。钥匙串是安全存储容器,这意味着当钥匙串被锁定时,没有人可以访问其受保护的内容。
"A keychain is an encrypted container that holds passwords for multiple applications and secure services. Keychains are secure storage containers, which means that when the keychain is locked, no one can access its protected contents".
这是两个很好的教程。
更多推荐
在iOS中维护登录凭据的最佳方法是什么?
发布评论