I've been googling around on how to store a password, and most of the people say that the only acceptable option is Keychain. I implemented that kind of approach, due to rush. But now I am curious what is that obvious thing to not store passwords in NSUserDefaults
and is it ok to store password in CoreData?
So far I understood that NSUserDefaults
are stored as a plain text in plist file. But how may one access this file? I've read that it is possible to do with the help of a lightning cable and an itunes, but didn't find how to do that.
Thanks in advance!
Data you store using NSUSerDefault
are getting saved in simple plist -in binary format without any encryption. there are many tricks to read these data or modify these data.
Jailbreak users can use iFile to view or modify plist files. Non-Jailbreak users can use other software like iExplore - iFunBox to do this. This software allows users to explore the iOS filesystem without having phone jailbroken
Long story short -- anyone can see or modify data in NSUserDefault
. So if you don't want to share your detail publicly, you should never store them in NSUserDefault
.
The problem in here is Jailbroken device, while the device is Jailbroken, it will allow other app/tweak to intercept with the sandbox files inside the app, thus can search/read the .plist
file in there, atleast thats what i know of
© 2022 - 2024 — McMap. All rights reserved.
so for security reason all time store data in NSUserdefault
. Its not secure at all. NSUserDefaults is a plist file which stores data in plain text. If you access to ipa, you can read that plist. – EstelleestenNSuserdefault you can access only when your application is runing in xcode
WRONG. Get your facts straight. – EstelleestenPBKDF2
(akaRfc2898DeriveBytes
),password_hash
/password_verify
,Bcrypt
and similar functions. The point is to make the attacker spend a lot of time finding passwords by brute force. Protecting your users is important, please use secure password methods. – Bes