StrataFrame Forum

Decrypting XML file

http://forum.strataframe.net/Topic6777.aspx

By Tim Dol - 2/14/2007

I have a xml file that stores some sensitive information.  I have a routine to load the XML file into a dataset using readxml(File) and then I use CopyDataFrom to move the data into a business object.

This works perfectly, however I need to encrypt the file, so I am now using TripleDesStream.EncryptFile to encrypt the file, but I can't quite figure out how to decrypt the file so I can then use my previous routine to load the business object, without actually decrypting the file on disk. Is there a way to decrypt this file into memory and load the business object from the copy in memory? 

By Trent L. Taylor - 2/15/2007

You can look at the XML Business Object sample that shows how to interact with XML and BOs.  If you use the StrataFrame XML classes, you can have XML files automatically updated for you if you change the structure as well as encrypt the XML files for you when opening and writing.

MicroFour.StrataFrame.Xml.XmlBasics.OpenXmlFile("1.0", "MyTable", "c:\MyXML.XML", CreateMyColumnStructure())
MicroFour.StrataFrame.Xml.XmlBasics.WriteXmlFile(YourDataSet, "c:\MyXML.XML", True)