I am trying to encrypt the entire xml file for security, including its nodes and values. I have done something but I am not sure if it is correct way to do it. And also I am getting a null exception during the runtime
Encryption scrty = new Encryption("arif");
XmlDocument doc = new XmlDocument();
doc.Load("D:\\PROJELE\\XML\\Language.xml");
string tst = scrty.Encrypt(doc.InnerXml);
doc.InnerText = tst; // "null exception" is thrown here************
doc.Save("D:\\PROJELER\\XML\\Language2.xml");
After encryption, how can I assign it encrypted text to doc? is there any other way to do this?