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?
Asked
Active
Viewed 203 times
0
-
use keychain, otherwise encrypt the username and password then store it to localdb like AES encryption. Please use COREDATA for the alteration of SQLite – S. Karthik Mar 04 '16 at 17:51
-
You can check you answer from this link http://stackoverflow.com/questions/6972092/ios-how-to-store-username-password-within-an-app?rq=1 – iParesh Mar 04 '16 at 17:54
-
you are welcome friend/// – S. Karthik Mar 04 '16 at 17:57
2 Answers
2
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!

Ruchira Randana
- 4,021
- 1
- 27
- 24
0
Keychain is the best option to save any kind of passwords. Use library SSKeychain which is a light weight wrapper for keychain.

BangOperator
- 4,377
- 2
- 24
- 38

Maulik Bhuptani
- 597
- 3
- 14
-
-
Your advice is very contradictory... how is a wrapper for the keychain better than using it directly? – Luke Mar 04 '16 at 22:59
-
Guys you have mistaken me. I mentioned Keychain is the best option. @Luke i never said SSKeychain is better than Keychain. Its just a suggestion. So my advice by no means is contradictory. – Maulik Bhuptani Mar 05 '16 at 04:45