存储iOS应用的用户密码和用户名 [英] Storing iOS app's user password and username

查看:158
本文介绍了存储iOS应用的用户密码和用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SQLite数据库来构建iOS应用.在数据库或钥匙串中存储用户名和密码的最佳方法是哪种?另外,如果我将任何数据存储在数据库中,如何确保其像钥匙串一样安全?

I am using a SQLite database to build an iOS app. Which is the best way to store username and password: in the database or the Keychain? Also, if I store any data in database how can I make it secure like the keychain?

推荐答案

钥匙串更好.但是,我们建议您不要保存密码.您应该始终保存哈希值,并比较哈希值以查看登录是否正确!

Keychain is better. However, we recommend that you don't save the password. You should always save the hash value and compare the hashes to see if the login is correct!

这篇关于存储iOS应用的用户密码和用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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