decrypt a TripleDes encrypted byte array using the .NET library

  • Thread starter Thread starter hazz
  • Start date Start date
H

hazz

Guest
How would I decrypte the CipherValue below using the .net security library?

<soapenv:Body wsu:Id="Id-3f672b2a-9dfe-4094-8f94-d89eb68b0b12"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
<xenc:EncryptedData Id="G0xc212edc0-2dD"
Type="http://www.w3.org/2001/04/xmlenc#Content"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
<xenc:CipherData>
<xenc:CipherValue>ItJFqdX...agLztGK/3s6yuhqtyhEA</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</soapenv:Body>

09ffb01670ec97514cc068b1bd8e3cc7._.jpg






I began with the following but seem to be going about this wrong: I dumped the CipherValue to a file, response.txt

TripleDESCryptoServiceProvider tDESkey = new TripleDESCryptoServiceProvider();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("C:\\bnew\\response.txt");

Decrypt(xmlDoc, tDESkey);

Thank you,

Greg

Continue reading...
 
Back
Top