I'm creating an iOS game, and create a SQLite database file to save data taking place in the game.
I have read that someone with decent knowledge could essentially access and open up that file, and make edits to it.
Is there anyway to prevent a user from doing there? Either by encrypting or password protecting the SQLite file itself?
Thanks for any ideas!
Encrypting or password protecting SQLite file
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Encrypting or password protecting SQLite file
My guess is that encrypting the file would not work well due to how SQLite works. You certainly could store your data inside the database encrypted though. Depending on how much data you are dealing with, you could use other file formats that could be more easily encrypted directly (LSON as one example).
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
-
- Posts: 722
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: Encrypting or password protecting SQLite file
Hi booee,
I have a total different solution when I need to store data for an application but do not need to share the data.
I Have two global arrays in any application I build.
Here is an example stack (hope I did not make any mistakes, tested it only twice!). Regards,
Paul
I have a total different solution when I need to store data for an application but do not need to share the data.
I Have two global arrays in any application I build.
- 1 for keeping data that I want to save in a protected ini file
- 1 for all data I need while the app is running
Here is an example stack (hope I did not make any mistakes, tested it only twice!). Regards,
Paul
Re: Encrypting or password protecting SQLite file
That is super clever, Mr Coolion.
I ended up doing a very crude encryption process, by just creating encoding and decoding upon save and load.
Your process is much more clever, and I'll probably swing back around and implement something like this instead. Thank you so much for sharing!
I ended up doing a very crude encryption process, by just creating encoding and decoding upon save and load.
Your process is much more clever, and I'll probably swing back around and implement something like this instead. Thank you so much for sharing!
-
- Posts: 722
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: Encrypting or password protecting SQLite file
My pleasure,