Storing iOS app's user password and username

2019-09-10 11:19发布

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?

2条回答
forever°为你锁心
2楼-- · 2019-09-10 11:24

Keychain is the best option to save any kind of passwords. Use library SSKeychain which is a light weight wrapper for keychain.

查看更多
女痞
3楼-- · 2019-09-10 11:27

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!

查看更多
登录 后发表回答