简体   繁体   中英

how to protect application files from being modified?

我有一个由Visual Studio 2008制作的Windows应用程序。此应用程序使用一些图形文件(例如jpeg.i)进行设置,以表示赞赏,但我担心客户端会修改此类文件。请您帮我保护一下那些文件?

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.

您可以将图像嵌入到包含在exe文件中的资源文件中。

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).

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM