/// <summary> /// Encrypt the passed password and set in preferences. Always persist the preference /// </summary> /// <param name="decryptedPassword">A human readable password</param> public static void SetPassword(string decryptedPassword) { var encryptedPassword = decryptedPassword.Encrypt(KeyConstants.Key); PreferenceManager.SetPreference(PrefConstants.Password, encryptedPassword); PreferenceManager.SavePreferences(); }
protected override void OnExit(ExitEventArgs e) { PreferenceManager.SavePreferences(); }