I'm attaching a some code (it's just richtext) that will show you how to
define a section in a config file and pull the data out.) You can encrypt it
one of a zillion ways using anything in system CryptoGraphy. I've attached
a VB code class as well. You can just define a cypher for it or use the one
provided "=!@4Fguip:}109NmkDW;>%}zxB>?4Rtd" However, Check out this link,
it's a much much better way of handling things...
http://www.aspnetpro.com/NewsletterArticle/2003/06/asp200306de_l/asp200306de_l.asp
Here's another link on encrypting data (there can be quite a bit to it...
http://www.aspsimply.com/ASPNet/CryptoASPX.aspx depending on how secure you
want your stuff).
So the only hard part if there is one that remains is the Configuration file
and my article that I included addresses that in depth.
HTH,
Bill
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT07.asp