|
-
Jul 7th, 2006, 03:02 AM
#1
Thread Starter
Addicted Member
[RESOLVED] [2.0][2005] Encrypting password in XML Config file
Hi,
I'm looking to store a password which is used when connecting to a default ftp site via my app in an XML config file. I need to be able to retrieve this each time the program in loaded.
I was wondering what the best way was to do this? I know that hashing encryption techniques are only one way and not suitable for the purpose. If using someting like a Symetric or Asymetric password i require a key which i presume would have to be hard coded into the application.
Is there a better way of doing this or will the latter method i suggested be the advised solution?
Many thanks in advance.
Grant
Last edited by MadCatVB; Jul 7th, 2006 at 04:19 AM.
-
Jul 7th, 2006, 03:58 AM
#2
Re: Encrypting password in XML Config file
After 135 posts you really should know to specify your version. If you're using 2.0 then encryption support for config files is built-in.
http://msdn.microsoft.com/library/de...AGHT000006.asp
It's aimed at ASP.NET but it can be used for Windows Forms apps too. You just have to use the -pef switch when invoking aspnet_regiis. The bit about Web Farms is what you apply to your installations.
-
Jul 7th, 2006, 04:20 AM
#3
Thread Starter
Addicted Member
Re: [2.0][2005] Encrypting password in XML Config file
Slight oversight on my part. consider my topic changed to include versions etc 
Thanks for the link. I'll look over it now.
Cheers,
Grant
-
Jul 7th, 2006, 08:55 AM
#4
Thread Starter
Addicted Member
Re: [2.0][2005] Encrypting password in XML Config file
Jmcilhinney,
Thanks for that link, its got me heading in the correct direction. I've now read that and found a new link:
http://msdn2.microsoft.com/en-us/library/89211k9b.aspx
This link suggests using the Configuration class objects to change setting with in a config file.
I forgot to mention in my first post that i am not using the app.config file to store these variables, but one that i have created my self 'DHFconfig.config'. What i can't seem to figure out from these links is if it is possible to encrypt information in a custom config file as apposed to the App.config or Machine.config file using the configuration code.
Any further assistance would be greatly appreciated.
Thanks,
Grant
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|