In my .net web application I encrypted the of the web.config file.
But now I need to read this encrypted connection String from an external winforms application and display the result in a text box . The text box text would look something like this :
<connectionStrings configProtectionProvider="CustomEncryptProvider">
<EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
xmlns="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<KeyName>Rsa Key</KeyName>
</KeyInfo>
<CipherData>
<CipherValue>Smbfcf3dHbuYZ34hLWtATU8fBqNL/CvPk24tLj9gLOizLzV88den52yhtYQ5AwXe2vVZP/GKRsWB+rcX/6ufBkz75HyVOnJHTCgLQ+JcsRX/9Td5ZzWJrEq1JBdpFzBsS9aLGLMREIILPedmFxO5+0GLIaBPzZ9/BhNcN8GXa+k=</CipherValue>
</CipherData>
</EncryptedKey>
</KeyInfo>
<CipherData>
<CipherValue>raoQqDzlXmMCy+3VliV6oyMoQzgIapSmBKw666WbUjLgurCh4aS+pwSMW3wULOpi+jh8BdDE/aPwvhDw9kTuComyHBsEB4xMtRFaBY1NSyrwx7dnP44x4NS+LowJ1EQiN2fAZqWDDVAljRIlq3DtZhC9YkYl4H1rEjQVvljD0pus1O8ftiqKy/yma1/rqzI+F/87GrFR1ZM8cS/ujXagtfzqME4iVdTgl/eyEPkrd5f6SGwlieeC0zJ2ErV9zIr+Af2Sc6mk2hz7/+t2x3kAzDzHU2PFfBqiLSP6o/0XAdRl43Q/Jwr72552mus7n5urlzvyND0KXKzk4Gg4bVYuo8sSQvphbFuLgHIxq+6ShDdCc9wfMzsBmGU4ayYbn/a4rI8lB5y6GzK0kQvnH0qtWQ==</CipherValue>
</CipherData>
</EncryptedData>
</connectionStrings>
How to achieve the same ? Please note I only have the physical path to the web.config file .