0

aspnet_regiis を使用して web.config を暗号化すると、最初の行に次のように表示されます

configProtectionProvider="RsaProtectedConfigurationProvider"

そして後でそれは言います

<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />

そしてさらにその後、それは言います

<EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />

プロバイダーが RsaProtectedConfigurationProvider タイプの場合、トリプル行がそこにある理由がわかりません。

4

2 に答える 2

0

最初に使用するキーを作成しましたか?

これを行う方法の例を次に示します。Webファームシナリオまでスクロールダウンします。msdnmicrosoft

于 2012-07-19T20:57:57.460 に答える
0

これは、webconfigでメソッドRsaProtectedConfigurationProviderを暗号化するために使用される一連のイベントです。


 <appSettings configProtectionProvider="RsaProtectedConfigurationProvider">
<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>XXXXXX</KeyName>
      </KeyInfo>
      <CipherData>
        <CipherValue>GW5cBFyCHZxAmSTGf+eKfIQmi7Vy450CGKEnMk8nJBW+3w0R4QZAEyneaZ0=</CipherValue>
      </CipherData>
    </EncryptedKey>
  </KeyInfo>
  <CipherData>
    <CipherValue>vH3V+KnNRAc9ps+AhzrrFf2HABiqI/dlnYCCDE+wxoUZ4CoVReswbyTKU4ZybcuxmUwV2z5kUNaAQ8Rmei3IsN7VRx7pVXjDtOT4osA0Jc</CipherValue>
  </CipherData>
</EncryptedData>



これを手伝ってください:エテ

于 2012-07-19T21:13:34.483 に答える