Saturday, June 18, 2005

Loading Blowfish-Encrypted Data Into an MSXML2 DOM Object

When using the MSXML2 library, you typically load XML files from disk into a DOM (Document Object Model) object by creating an instance of IXMLDOMDocument and calling its load function—where you pass a BSTR reprentation of the file name. However, I had a situation recently where—due to security concerns—I needed to first decrypt the XML data in memory and then load that memory (without writing it to disk) into a DOM object. Surprisingly, I wasn't able to find any open source examples of how to do this, so I wrote a couple of helper functions to accomplish this task. Hopefully, these functions will help others who run into a similar situation.



PC said...

Where is the code Umesh ?

umesh said...

click on the link 'more'