Code for Change Master Password

This commit is contained in:
Jim Norman
2005-11-03 20:24:36 +00:00
parent fb5296c0c3
commit 04e1ae02b0
3 changed files with 61 additions and 41 deletions

View File

@@ -115,6 +115,19 @@ namespace Novell.CASA
{
return NativeCalls.IsSecretPersistent(ssFlags,secretID);
}
public static bool ChangeMasterPassword(string sCurrentPassword, string sNewPassword)
{
if (sCurrentPassword == null || sNewPassword == null)
{
throw new miCasaException(miCasaException.NSSCS_E_INVALID_PARAM);
}
if (sNewPassword.Length < 8)
throw new miCasaException(miCasaException.NSSCS_E_MP_PWORD_NOT_ALLOWED);
return NativeCalls.ResetMasterPassword(sCurrentPassword, sNewPassword);
}
}
}