From c31fdccbfbf86acfa23cff90fe22e2eda47c1afe Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:36:35 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=BF=9C=E7=A8=8B=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E4=B9=9F=E6=B7=BB=E5=8A=A0=E5=AD=98=E5=82=A8=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Settings/RemoteControlUserControlModel.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/RemoteControlUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/RemoteControlUserControlModel.cs index 9d751ff077..b2baebe99f 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/Settings/RemoteControlUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/RemoteControlUserControlModel.cs @@ -30,7 +30,7 @@ public class RemoteControlUserControlModel : PropertyChangedBase public static RemoteControlUserControlModel Instance { get; } - private string _remoteControlGetTaskEndpointUri = ConfigurationHelper.GetValue(ConfigurationKeys.RemoteControlGetTaskEndpointUri, string.Empty); + private string _remoteControlGetTaskEndpointUri = SimpleEncryptionHelper.Decrypt(ConfigurationHelper.GetValue(ConfigurationKeys.RemoteControlGetTaskEndpointUri, string.Empty)); public string RemoteControlGetTaskEndpointUri { @@ -43,11 +43,12 @@ public class RemoteControlUserControlModel : PropertyChangedBase } Instances.RemoteControlService.InitializePollJobTask(); + value = SimpleEncryptionHelper.Encrypt(value); ConfigurationHelper.SetValue(ConfigurationKeys.RemoteControlGetTaskEndpointUri, value); } } - private string _remoteControlReportStatusUri = ConfigurationHelper.GetValue(ConfigurationKeys.RemoteControlReportStatusUri, string.Empty); + private string _remoteControlReportStatusUri = SimpleEncryptionHelper.Decrypt(ConfigurationHelper.GetValue(ConfigurationKeys.RemoteControlReportStatusUri, string.Empty)); public string RemoteControlReportStatusUri { @@ -55,11 +56,12 @@ public class RemoteControlUserControlModel : PropertyChangedBase set { SetAndNotify(ref _remoteControlReportStatusUri, value); + value = SimpleEncryptionHelper.Encrypt(value); ConfigurationHelper.SetValue(ConfigurationKeys.RemoteControlReportStatusUri, value); } } - private string _remoteControlUserIdentity = ConfigurationHelper.GetValue(ConfigurationKeys.RemoteControlUserIdentity, string.Empty); + private string _remoteControlUserIdentity = SimpleEncryptionHelper.Decrypt(ConfigurationHelper.GetValue(ConfigurationKeys.RemoteControlUserIdentity, string.Empty)); public string RemoteControlUserIdentity { @@ -67,11 +69,12 @@ public class RemoteControlUserControlModel : PropertyChangedBase set { SetAndNotify(ref _remoteControlUserIdentity, value); + value = SimpleEncryptionHelper.Encrypt(value); ConfigurationHelper.SetValue(ConfigurationKeys.RemoteControlUserIdentity, value); } } - private string _remoteControlDeviceIdentity = ConfigurationHelper.GetValue(ConfigurationKeys.RemoteControlDeviceIdentity, string.Empty); + private string _remoteControlDeviceIdentity = SimpleEncryptionHelper.Decrypt(ConfigurationHelper.GetValue(ConfigurationKeys.RemoteControlDeviceIdentity, string.Empty)); public string RemoteControlDeviceIdentity { @@ -79,6 +82,7 @@ public class RemoteControlUserControlModel : PropertyChangedBase set { SetAndNotify(ref _remoteControlDeviceIdentity, value); + value = SimpleEncryptionHelper.Encrypt(value); ConfigurationHelper.SetValue(ConfigurationKeys.RemoteControlDeviceIdentity, value); } }