Code needed for Change Master Password

This commit is contained in:
Jim Norman
2005-11-03 20:22:45 +00:00
parent 9412f726e6
commit fb5296c0c3
7 changed files with 83 additions and 0 deletions

View File

@@ -597,6 +597,18 @@ namespace sscs.cache
return true;
}
internal bool ChangeMasterPassword(string sCurrentPWD, string sNewPWD)
{
string sMasterFilePath = GetPasscodeByMasterPasswdFilePath();
byte[] baPasscode = CASACrypto.GetMasterPasscodeUsingMasterPasswd(sCurrentPWD, sMasterFilePath);
if (baPasscode != null)
{
CASACrypto.EncryptAndStoreMasterPasscodeUsingString(baPasscode, sNewPWD, sMasterFilePath);
return true;
}
return false;
}
internal string GetDesktopPasswd()
{
try