在iOS中维护登录凭据的最佳方法是什么? [英] What is the best way to maintain the login credentials in iOS?

查看:148
本文介绍了在iOS中维护登录凭据的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在整个应用程序中维护我的登录凭据,所以,
我有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".

这是两个很好的教程。


  1. 如何在iOS中存储密码

  2. 使用钥匙串存储用户姓名和密码

  3. 如何保护用户数据

  1. How Not to Store Passwords in iOS
  2. Using Keychain to Store Username and Password
  3. How to secure user data

这篇关于在iOS中维护登录凭据的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆