jbajaj
asked on
Decrypting gzip file
Hello
I am fetching an XML file form an external source which is encrypted using gzip, in my application
How can I decrypt it and extract the XMP out of it to parse it.
I am using .NET 3.5 with C#
I am fetching an XML file form an external source which is encrypted using gzip, in my application
How can I decrypt it and extract the XMP out of it to parse it.
I am using .NET 3.5 with C#
Hello,
Decompression can be performed by either GZipStream or DeflateStream classes depending on the format of compressed data.
As for extracting XMP you could load xml in XmlDocument and use SelectSingleNode() with XPath expression to find this node.
Decompression can be performed by either GZipStream or DeflateStream classes depending on the format of compressed data.
As for extracting XMP you could load xml in XmlDocument and use SelectSingleNode() with XPath expression to find this node.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Wait a minute, I thought we were talking about files encrypted with gzip and not only compressed. Else of course, it is far more easier.
Or, probably could you do it in 2 step:
1. unzip with System.IO.Compression.GZip
2. decrypt using System.Security.Cryptograp
http://www.obviex.com/samples/Encryption.aspx
I'm not 100% sure the second solution would work (let's give a try) but the first will in any cases.