Enterprise Library 3.0 January 2007 CTP 数据访问程序块 _ 系统自带链接字符串加密
Enterprise Library 3.0的加密其实很简单,只需一步
未加密的文件
选择数据保护的方式
在EL里面完毕后保存全部,再看看配置文件
未加密的文件
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.9.9.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<dataConfiguration defaultDatabase="DB Instance" />
<connectionStrings>
<add name="DB Instance" connectionString="Database=ELDB;Server=(local)\SQLEXPRESS;Integrated Security=SSPI;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings />
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.9.9.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<dataConfiguration defaultDatabase="DB Instance" />
<connectionStrings>
<add name="DB Instance" connectionString="Database=ELDB;Server=(local)\SQLEXPRESS;Integrated Security=SSPI;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings />
选择数据保护的方式
在EL里面完毕后保存全部,再看看配置文件
<configSections>
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.9.9.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<dataConfiguration configProtectionProvider="DataProtectionConfigurationProvider">
<EncryptedData>
<CipherData>
<CipherValue>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAhCGDF49daEGuXKboVzBlVgQAAAACAAAAAAADZgAAqAAAABAAAABA7KW9WAXXyhmTuFdZNyksAAAAAASAAACgAAAAEAAAALqlLn9mwvu9Y3IIxlpR8HBoAAAAe/LYTgnwAt6jpz1dn3NzDRTAwfq6kZ1JDrqVTsir3p95YvyY+/VJ6u//K9nyq5qbgYd67NTR2TSTgDNqvARObsw7oQEYFTmTVGtNpdfJDUd0rUTeo7CQiRl5Go8TFQ6QvyiLgs32WsIUAAAAS/8Vt2nTm3Im3KnQa9urF9PaY4U=</CipherValue>
</CipherData>
</EncryptedData>
</dataConfiguration>
<connectionStrings configProtectionProvider="DataProtectionConfigurationProvider">
<EncryptedData>
<CipherData>
<CipherValue>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAhCGDF49daEGuXKboVzBlVgQAAAACAAAAAAADZgAAqAAAABAAAABmcDGQ0Ug6dRrK15ERWS98AAAAAASAAACgAAAAEAAAADZNzkdY8WyZNB6JnBlbQPCIAQAAlhYiSrA1uSMsz36cUHLwskwBmRRvtKAC0XsfVu6tN0xqcFIY6tKeoOvdQp/btkUVdRdCHLu/anPJyYxh5UZUSyhiei9WuCS/73xJ/T5Ghz2TPfRpU+iv7/g0o+1GUu0W0ilQ22Dvm3crOrrtj1jyInxLj/noMMiZjNd1PgNhxX1uGNhfhBT9SuCu53ws4/oULl4Cgdu/2cPiwVSI6SgNvJ8d6u+s40Ib64rfGuvo8ztsusxlgtHomlD2cIbDJQCiuBiHsD8SnsHduapMCBZUQu6GbE+mEei3belUSrQoitWasEsEkHRT+vZpnWujfVeWg1oSxSy8/CD/R0PGFd3ROd90Ms/wpd8MMAzjrlTwVfYFCNXMWvrzJweDuI6FuYg6QqWc4An7wLFX4Pecog8pMIV5QuxISiOG24o/i5hDfvlYEaL0HZ3uu6JL/Dl0nqXhPxTwWUFDFLPmqhlUgMatfa1u0ZDIu8L7ojgg4ixHRMOXNylH3+0yAAKi1TdWrs+qBop9FmEpOvUUAAAAVyjyWq+bP/wFxnkSPFJNCJ4Rxd4=</CipherValue>
</CipherData>
</EncryptedData>
</connectionStrings>
<appSettings />
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.9.9.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<dataConfiguration configProtectionProvider="DataProtectionConfigurationProvider">
<EncryptedData>
<CipherData>
<CipherValue>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAhCGDF49daEGuXKboVzBlVgQAAAACAAAAAAADZgAAqAAAABAAAABA7KW9WAXXyhmTuFdZNyksAAAAAASAAACgAAAAEAAAALqlLn9mwvu9Y3IIxlpR8HBoAAAAe/LYTgnwAt6jpz1dn3NzDRTAwfq6kZ1JDrqVTsir3p95YvyY+/VJ6u//K9nyq5qbgYd67NTR2TSTgDNqvARObsw7oQEYFTmTVGtNpdfJDUd0rUTeo7CQiRl5Go8TFQ6QvyiLgs32WsIUAAAAS/8Vt2nTm3Im3KnQa9urF9PaY4U=</CipherValue>
</CipherData>
</EncryptedData>
</dataConfiguration>
<connectionStrings configProtectionProvider="DataProtectionConfigurationProvider">
<EncryptedData>
<CipherData>
<CipherValue>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAhCGDF49daEGuXKboVzBlVgQAAAACAAAAAAADZgAAqAAAABAAAABmcDGQ0Ug6dRrK15ERWS98AAAAAASAAACgAAAAEAAAADZNzkdY8WyZNB6JnBlbQPCIAQAAlhYiSrA1uSMsz36cUHLwskwBmRRvtKAC0XsfVu6tN0xqcFIY6tKeoOvdQp/btkUVdRdCHLu/anPJyYxh5UZUSyhiei9WuCS/73xJ/T5Ghz2TPfRpU+iv7/g0o+1GUu0W0ilQ22Dvm3crOrrtj1jyInxLj/noMMiZjNd1PgNhxX1uGNhfhBT9SuCu53ws4/oULl4Cgdu/2cPiwVSI6SgNvJ8d6u+s40Ib64rfGuvo8ztsusxlgtHomlD2cIbDJQCiuBiHsD8SnsHduapMCBZUQu6GbE+mEei3belUSrQoitWasEsEkHRT+vZpnWujfVeWg1oSxSy8/CD/R0PGFd3ROd90Ms/wpd8MMAzjrlTwVfYFCNXMWvrzJweDuI6FuYg6QqWc4An7wLFX4Pecog8pMIV5QuxISiOG24o/i5hDfvlYEaL0HZ3uu6JL/Dl0nqXhPxTwWUFDFLPmqhlUgMatfa1u0ZDIu8L7ojgg4ixHRMOXNylH3+0yAAKi1TdWrs+qBop9FmEpOvUUAAAAVyjyWq+bP/wFxnkSPFJNCJ4Rxd4=</CipherValue>
</CipherData>
</EncryptedData>
</connectionStrings>
<appSettings />