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

您是否首先创建了要使用的密钥?

这是一个示例,向下滚动到网络农场场景:msdn microsoft

于 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>



帮助自己解决这个问题:ete

于 2012-07-19T21:13:34.483 回答