in my project i have xml file to store and retrieveDevice Objects
and i want user can add or delete in my xml file only by my application not manually
so i need to story data in some format user cannot understand it like viewState in asp.net base64 or some thing else
My Question is how i can save my data in xml file but i want user can not understand what is written
this is my Device Class
public class Device
{
public string Username { get; set; }
public string AgentName { get; set; }
public string Password { get; set; }
public string Domain { get; set; }
public string PeerURI { get; set; }
public string SipURI { get; set; }
public string FQDN { get; set; }
public Enums.DeviceType Type { get; set; }
public Enums.ServerTransportType TransportType { get; set; }
public bool IsInitialized { get; set; }
}
and this is my xml file
<?xml version="1.0" encoding="utf-8"?>
<settings>
<username>foo</username>
<AgentName>foo1</AgentName>
<password>foo2</password>
<domain>go</domain>
<peerUri>140.242.250.200</peerUri>
<sipUri>sip:xxx@xxxxx.com</sipUri>
<fqdn>ff.go.xxxx.com</fqdn>
<type>2</type>
<transportType>2</transportType>
</settings>
If you use Binary Serialisation, the file is not human readable at all.
Here is a short example for your issue: