开发者

data files in an application

开发者 https://www.devze.com 2022-12-18 16:21 出处:网络
We have data files which are encrypted in our wpf app. We would like to save in a location where the user will not be aware just to avoid any modifications/tampering in any way.

We have data files which are encrypted in our wpf app. We would like to save in a location where the user will not be aware just to avoid any modifications/tampering in any way. The datafiles are of sizes nearly 100MB and some of them are zipfiles. One thought is storing them in IsolatedFileStorage but it looks like it only allows to save strings in txt and due to the size being too large there seems to be issues saving them. Another thought is save th开发者_开发知识库em in the same folder where the program runs from but set the hidden attributes so they are not visible. Just wondering if you have any suggestions. Thanks N


Keeping files invisible from the user is maybe not a good idea. After all its his machine and he might want to know where his discspace is going. If the files are zip maybe you can put a password on them.


You want to look at the isolated storage functions

http://www.codeproject.com/KB/dotnet/IsolatedStorage.aspx

You can encrypt the files before writing them into storage using a CrpytoStream.

http://www.codeproject.com/KB/security/using_cryptostream.aspx


Yeah, I would hide them and bury them deep inside the user profile (%USERPROFILE%) or application data (%APPDATA%) directories.

0

精彩评论

暂无评论...
验证码 换一张
取 消