Cryptography block for config vs. .Net ProtectedConfiguration

Topics: Cryptography Application Block
Oct 23, 2011 at 6:48 AM

Hi forum

My company uses the Cryptography block for encrypting connection strings. I'm thinking it is a leftover from before .Net Protected Configuration in .Net 2.0 - Is there any advantage of using the Cryptograpy block for encrypting configuration files as opposed to .Net Protected Configuration?

Hope someone can clear this up for me :)

Best regards


Oct 23, 2011 at 8:36 AM

Yes, this is a left over from when Enterprise Library provided extensive configuration support before System.Configuration enhancements in .NET 2.0.

For encrypting/decrypting configuration files Protected Configuration should be used.
This is actually what later versions of Enterprise Library use for encrypting configuration. 

Randy Levy
Enterprise Library support engineer