Enterprise Library Cryptography
When using the Jan '05 relaease of MS Enterprise Library, I have encrypted the dataconfiguration.config file. My question is how do I decrypt it at run time? I need to be able to read the contents at run time.I am confused on two issues:
1) How do I reference the encryption key, which I assume once referenced, I could then use the Cryptography block to decrypt? (you would need to understand that the key for enrypting any of the config files in the Enterprise Library is NOT created by the core Cryptography block but in stead by a sub-code of the Cryptography block associated with the Configuration block...and this sub-code does not seem to publish a key that could then be used/read by the Cryptography block to decrypt the dataconfiguration.config file)
2) How do I read in the decrypted dataconfiguration.config file and preserve the original format...theMS example shows:
Dim decryptedContents As Byte() = Cryptographer.DecryptSymmetric(symmProvider, Me.encryptedContents). Note that the encryptedContents is assumed to be the encrypted file (Private encryptedContents As Byte()). Regarding this question my concern is the Byte() type...does this preserve the XML string contents of the original file so as to allow me to search through it?
Thanks!
Jeff Herington

