D
D
dezinger2013-04-08 22:28:04
iOS
dezinger, 2013-04-08 22:28:04

How to protect the sqlite database supplied with the application from being copied?

The DB goes in place with the application and is updated over time.
The easiest way to steal a database is to unzip ipa.
The first thing that comes to mind for protection is archiving the database with a password.
But this does not save you from another way to steal the database on an unlocked device, after the first launch of the application, when the archive is unpacked.
What methods of protection are used in such cases?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
IbrahimKZ, 2013-04-10
@desinger

I think the easiest way is to encrypt the individual fields you want to protect. When extracting, decrypt according to some key algorithm, for example, depending on the line id. I don't think it should slow down too much. Well, when saving-changing it is similar.

D
dezinger, 2013-04-08
@dezinger

So far found SQLCipher .

N
Nikita Gusakov, 2013-04-08
@hell0w0rd

I am far from IOS-development, but it is impossible to encrypt the database? That is, they dragged away - well, okay, sit down to decipher?

X
xmoonlight, 2013-04-09
@xmoonlight

If the base is so important, make your base format.
For example, a container cube: table, column, data. (if the database is small)
or container sheets: column, data and index file of the database (if the database is large)
Then encrypt the container (or the entire database file) and load it (them) from the file when the application is opened (as needed).
Read the entire container into memory and decode into an array of values.
If there were changes to the database, encrypt the container in memory, overwrite the file on the media.
It is not difficult to write such a class once.
For the time spent - You will keep the database unavailable for distribution longer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question