I want to add an XML file, containing sensitive data, to my application.
I don’t want anyone to be able to get this file and use its content.
How can I achieve this?
I thought using encryption might be a good idea, but then how can I pass the encryption password without writing it in the code ? (I don’t want somebody to be able to find it by using a decompiler)
Is Isolated Storage considered a safe place? Can somebody else, other than my application, reach it?
Short answer – there is no 100% secure method to store your XML file on the phone, as it can be extracted from the Isolated Storage regardless of whether you allow it or now. Your best bet is encrypting the file and obfuscating the source-code.
Dave Amenta suggested using ProtectedData, which might be one of the ways you might want to approach this problem.