Encrypting passwords in config files

G

Guest

Hello all. I have written a .Net .dll that edits properties in Active
Directory. I have to specify an Admin username and password in my LDAP
connection string when I bind to the Active Directory. I'm concerned about
hard coding an Admin password in my code or reading it from a config file for
obvious reasons. My first thought is to use encryption and hard code the
encrypted password in the .dll itself. Anyone know how to do this or anyone
have a better solution?
 
S

Shuvro Mazumder [MSFT]

After reading your post more carefully, I noticed that you want to encode
atbitrary data with your DLL. In an application we use in-house, the
solution was to use a DLL to encrypt data in the registry (under HKLM or
HKCR depending on the scenario). You can add the keys to the registry using
the same DLL during install after prompting the user for the Admin
user/password values.

Hope this helps
Shuvro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top