Code needed for Change Master Password
This commit is contained in:
12
c_micasad/cache/SecretStore.cs
vendored
12
c_micasad/cache/SecretStore.cs
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user