hiding data files

  • Thread starter Thread starter Digit24
  • Start date Start date
D

Digit24

I wast to develop an application that is to be distributed that will use a
database that will be installed with the application.

However, I do not want the database to be readable outside the application.

What is the best format to include the data file in?

Sorry, new to c#
 
Hi Digit,
I wast to develop an application that is to be distributed that will
use a database that will be installed with the application.

However, I do not want the database to be readable outside the
application.

What is the best format to include the data file in?

There is no way to make it impossible to read a datafile that is not part of
the application itself (which would mean that you cannot change the data).
With a hey editor, you can read any file that's on the disk ... you can only
make it a bit harder to find ...

Regards,

Frank Eller
www.frankeller.de
 
There are a few ways to sort of accomplish this but Frank's right that
there's no way to make it impossible. Depending on your database you
may be able to

1) keep the "main" database encrypted. decrypt into working file when
the app starts and keep the working file locked. encrypt the working
file into the persistent file on exit then delete the working copy. You
may do your own encryption, or get a zip library with encryption.

2) store the real data in an NTFS alternate data stream (google
http://www.google.com/search?hl=en&lr=lang_en&safe=off&q="ntfs+alternate+data+stream"&btnG=Search).
Have the main stream just be text "DO NOT DELETE THIS FILE" and maybe
some extra data to make it look important like "LICENSE: 32340dds83".
This won't keep everyone from finding the real data, but will stop most
people and applications from seeing that the database even exists. It
depends on what you are really trying to do (hide or secure - this only
hides it very well).

3) put it in a subdirectory that only grants permission to a special
user you create, then have your app open the file as that user. Admins
can still change the permissions and get access though.
 
Back
Top