开发者

Saving program working data

开发者 https://www.devze.com 2022-12-28 04:29 出处:网络
When the program runs, the intermediate data must save in the user\'s computer. Now I use .txt files, encoding with AES.

When the program runs, the intermediate data must save in the user's computer.

Now I use .txt files, encoding with AES.

开发者_StackOverflow

But file/code user can break, delete....

Maybe is better decision?


To protect user's data against other users use Data Protection API, and C# has easy to use classes to facilitate its use: ProtectedData, and there are examples on MSDN how to write protecetd data to a file, see How to: Use Data Protection.

If you are asking how to protect data so that the very user of the program cannot decrypt it, that is impossible and all claims to the contrary are snake oil. You can make it hard to decrypt, but you'll never make it impossible. If you cannot send data to the user, then keep it on the server and make all interactions with the data through a remote API (sockets, REST, queueing, whatever).

0

精彩评论

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