Question

I'm building a Windows Store app with C#, and I have certain data and settings that I need to persist between sessions. Right now I'm doing this with local files, but for some of it, I don't want the users to be able to edit the files. I currently thwart that by using "scary" file names and obfuscated data, but I want better security, but also don't want to have to jump to my cloud service just to pull their settings, because I want functionality when internet connectivity doesn't exist.

How do I do this? I feel like this is something that should be pretty commonly used feature in apps.

Was it helpful?

Solution

I never worked on Windows 8/8.1 apps, so maybe there is some integrated feature to do what yout want, but I didn't find anything on that subject. In fact, what I found seems to indicate the opposite :

If you want the data of your Windows Store app to be secured, you have to do it by yourself.

Depending on the desired level of security you could try using some form of encryption for your local files. This would make the settings unreadable by the user, and prevent them to tamper with it.

But as pointed in Windows 8 Apps - Local Storage Security, encryption might not be the best way if you really want to make sure the data cannot be edited outside your app, since it is possible to extract the key from your app and decode the data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top