Looking for new ideas on how store encrypted Database Password on client machine
I am on project team that is maintaining a few legacy VB6 applications. These applications are installed in over 600 customers worldwide mostly in the USA. These开发者_运维技巧 applications all connect to a database back end but the problem is that the SQL Login ID and password are hard coded inside of the application. With these projects we are using ODBC API to connect to the database.
What we would like to do is to provide a way for the users to set their own SQL Login ID password. We have thought of using Active Directory Authentication but we have dismissed this idea due to the fact that a user would be able to connect to the database using MS Access/Excel or Crystal Reports.
We are currently working on an idea where we would store the encrypted Login ID in either a INI file or in the registry but we are not liking these solutions at all. We are looking into using a Certificate but I think that we will have the same issue as with AD Authentication.
So please lets hear your ideas not matter how strange and outlandish they may be.
Why not store the user name and password in an ini file. Use a symmetrical key encryption (like AES) with salting and then base-64 encode the results. You can generate a true random key from Random.org. If you choose this route, I can provide some assistance.
精彩评论