Saving program working data
When the program runs, the intermediate data must save in the user's computer.
Now I use .txt files, encoding with AES.
开发者_StackOverflowBut 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).
精彩评论