views:

116

answers:

4

hi i have an windows application that i have made by visual studio 2008.this application uses some graphical files such as jpeg.i make a setup for this appreciation but i worry about such files being modified by client.would you please help me how to protect those files ?

+2  A: 

You could embed the images into resource files that get included in the exe.

Mark Redman
+7  A: 

To detect such a tampering you should add your graphical files as resource within your application (or load from another assembly) and use Strong-Name signing. Even if it is not completely secure, it should prevent the most ones from altering your resource files.

Oliver
can this method protect app.config files ?
persian Dev
Strong-Name signing is not meant to protect a assembly from tampering, its meant to add another layer of identity to the assembly...
Petoj
If you want to protest some content of app.config maybe it would be better to move that content somewhere else, e.g. hard code it, move it to database, ...
Petar Repac
A: 

The easiest way is to use the images as a resource.

If you don't want to do that for any reason, then you could also calculate a cypher of the jpegs (maybe MD5) and check them against the one you previously stored in the code while loading the load program (form.load or whatever).

Björn
+1  A: 

You could sign your files this way no one would be able to change the files without having your certificate.

this might be overkill and it depends on how mutch security you want else just place the images as resources.

Petoj