I have a service that needs to do some database work on my tables. So, I need to grab the OD connection string in order to connect to the database.
I'm reading the hashed password located in FreeDentalConfig.xml and decrypting it to build my connection string like so:
Code: Select all
case "MySQLPassHash":
mySQLPassword = reader.ReadString();
string decryptedPassword;
CDT.Class1.Decrypt(mySQLPassword, out decryptedPassword);
mySQLPassword = decryptedPassword;
break;
I notice that the hashed passwords that get written to FreeDentalConfig.xml are different -
In the debugger, the result is:
Code: Select all
<MySQLPassHash>mFvldBb0BOw4HgtwwOWehQ==</MySQLPassHash>
While in the live OD version, the result is :
Code: Select all
<MySQLPassHash>odv2e$vnJc7NZDVMwQ0cem/5eKvw==</MySQLPassHash>
The test password I am using is Jimpy919@
I notice in the preferences table there are two rows
ArchivePassHash
DatabaseIntegritiesWhitelist
which both contain the
odv2e$vnJc7NZDVMwQ0cem/5eKvw==
string.
If I delete these two strings from the preferences table, OD puts them right back in .
I've also tried
Code: Select all
connectionString = DataConnection.GetCurrentConnectionString();
Any help sorting this out is greatly appreciated.