From f3926d3f133879270215e2a8b99f19e78630b710 Mon Sep 17 00:00:00 2001 From: KIT! Date: Tue, 19 Mar 2024 12:31:36 +0100 Subject: [PATCH] Fixed encryption keys not being loaded properly. --- Commons/Utils/Config.cs | 5 +---- MainForm.RequestFiles.cs | 5 ++++- Program.cs | 7 ------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Commons/Utils/Config.cs b/Commons/Utils/Config.cs index 971a72e..e026536 100644 --- a/Commons/Utils/Config.cs +++ b/Commons/Utils/Config.cs @@ -5,10 +5,7 @@ private static IniFile CreateIniFile() { var ini = new IniFile(); - if(!ini.KeyExists("MusicOrderSort")) - { - ini.Write(MusicOrderSortProperty, MusicOrderSortValueNone); - } + if(!ini.KeyExists("MusicOrderSort")) ini.Write(MusicOrderSortProperty, MusicOrderSortValueNone); return ini; } diff --git a/MainForm.RequestFiles.cs b/MainForm.RequestFiles.cs index 0d49f05..1b804de 100644 --- a/MainForm.RequestFiles.cs +++ b/MainForm.RequestFiles.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Windows.Forms; using TaikoSoundEditor.Collections; using TaikoSoundEditor.Commons.Controls; +using TaikoSoundEditor.Commons.IO; using TaikoSoundEditor.Commons.Utils; using TaikoSoundEditor.Data; @@ -70,7 +71,9 @@ namespace TaikoSoundEditor Logger.Info($"Clicked 'Looks good' "); Config.DatatableIO.IsEncrypted = UseEncryptionBox.Checked; - + + SSL.LoadKeys(); + try { MusicAttributes = Config.DatatableIO.DeserializeCollection(MusicAttributePath, DatatableTypes.MusicAttribute); diff --git a/Program.cs b/Program.cs index bea0e9f..3b27d61 100644 --- a/Program.cs +++ b/Program.cs @@ -1,17 +1,12 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; -using System.Reflection; using System.Text; using System.Text.Json; -using System.Text.Json.Serialization; using System.Windows.Forms; using TaikoSoundEditor.Commons.Emit; -using TaikoSoundEditor.Commons.Extensions; -using TaikoSoundEditor.Commons.IO; using TaikoSoundEditor.Commons.Utils; using TaikoSoundEditor.Data; using TaikoSoundEditor.Properties; @@ -43,8 +38,6 @@ namespace TaikoSoundEditor { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; - SSL.LoadKeys(); - string json = Resources.datatable_def_08_18; try