diff --git a/ModernKeePassLib.UwpTest/Assets/LockScreenLogo.scale-200.png b/ModernKeePassLib.UwpTest/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57a..0000000 Binary files a/ModernKeePassLib.UwpTest/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/ModernKeePassLib.UwpTest/Assets/SplashScreen.scale-200.png b/ModernKeePassLib.UwpTest/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 023e7f1..0000000 Binary files a/ModernKeePassLib.UwpTest/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/ModernKeePassLib.UwpTest/Assets/Square150x150Logo.scale-200.png b/ModernKeePassLib.UwpTest/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index af49fec..0000000 Binary files a/ModernKeePassLib.UwpTest/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/ModernKeePassLib.UwpTest/Assets/Square44x44Logo.scale-200.png b/ModernKeePassLib.UwpTest/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index ce342a2..0000000 Binary files a/ModernKeePassLib.UwpTest/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/ModernKeePassLib.UwpTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/ModernKeePassLib.UwpTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index f6c02ce..0000000 Binary files a/ModernKeePassLib.UwpTest/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/ModernKeePassLib.UwpTest/Assets/StoreLogo.png b/ModernKeePassLib.UwpTest/Assets/StoreLogo.png deleted file mode 100644 index 7385b56..0000000 Binary files a/ModernKeePassLib.UwpTest/Assets/StoreLogo.png and /dev/null differ diff --git a/ModernKeePassLib.UwpTest/Assets/Wide310x150Logo.scale-200.png b/ModernKeePassLib.UwpTest/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b..0000000 Binary files a/ModernKeePassLib.UwpTest/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/ModernKeePassLib.UwpTest/KcpKeyFileTests.cs b/ModernKeePassLib.UwpTest/KcpKeyFileTests.cs deleted file mode 100644 index 524e522..0000000 --- a/ModernKeePassLib.UwpTest/KcpKeyFileTests.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.IO; -using System.Threading.Tasks; -using Windows.Storage; -using Windows.Storage.AccessCache; -using ModernKeePassLib.Keys; -using ModernKeePassLib.Utility; -using Xunit; - -namespace ModernKeePassLib.UwpTest -{ - public class KcpKeyFileTests - { - private const string TestCreateFile = "TestCreate.xml"; - private const string TestKey = "0123456789"; - - private const string ExpectedFileStart = - "\r\n" + - "\r\n" + - "\t\r\n" + - "\t\t1.00\r\n" + - "\t\r\n" + - "\t\r\n" + - "\t\t"; - - private const string ExpectedFileEnd = "\r\n\t\r\n"; - - [Fact] - public async Task TestConstruct() - { - var expectedKeyData = new byte[] - { - 0x95, 0x94, 0xdc, 0xb9, 0x91, 0xc6, 0x65, 0xa0, - 0x81, 0xf6, 0x6f, 0xca, 0x07, 0x1a, 0x30, 0xd1, - 0x1d, 0x65, 0xcf, 0x8d, 0x9c, 0x60, 0xfb, 0xe6, - 0x45, 0xfc, 0xc8, 0x92, 0xbd, 0xeb, 0xaf, 0xc3 - }; - - var folder = await StorageFolder.GetFolderFromPathAsync(Path.GetTempPath()); - var file = await folder.CreateFileAsync(TestCreateFile, CreationCollisionOption.ReplaceExisting); - var token = StorageApplicationPermissions.FutureAccessList.Add(file); - using (var fs = await file.OpenStreamForWriteAsync()) - { - using (var sw = new StreamWriter(fs)) - { - sw.Write(ExpectedFileStart); - sw.Write(TestKey); - sw.Write(ExpectedFileEnd); - } - } - - try - { - var keyFile = new KcpKeyFile(token); - var keyData = keyFile.KeyData.ReadData(); - Assert.True(MemUtil.ArraysEqual(keyData, expectedKeyData)); - } - finally - { - await file.DeleteAsync(); - } - } - - [Fact] - public async Task TestCreate() - { - var folder = await StorageFolder.GetFolderFromPathAsync(Path.GetTempPath()); - var file = await folder.CreateFileAsync(TestCreateFile, CreationCollisionOption.ReplaceExisting); - var token = StorageApplicationPermissions.FutureAccessList.Add(file); - KcpKeyFile.Create(token, null); - try - { - var fileContents = await FileIO.ReadTextAsync(file); - - Assert.Equal(185, fileContents.Length); - Assert.StartsWith(ExpectedFileStart, fileContents); - Assert.EndsWith(ExpectedFileEnd, fileContents); - } - finally - { - await file.DeleteAsync(); - } - } - } -} - diff --git a/ModernKeePassLib.UwpTest/ModernKeePassLib.UwpTest.csproj b/ModernKeePassLib.UwpTest/ModernKeePassLib.UwpTest.csproj deleted file mode 100644 index dc8adae..0000000 --- a/ModernKeePassLib.UwpTest/ModernKeePassLib.UwpTest.csproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - Debug - x86 - {E43877FF-6725-43DA-A3AF-F1A7CB86EE03} - AppContainerExe - Properties - ModernKeePassLib.UwpTest - ModernKeePassLib.UwpTest - en-US - UAP - 10.0.17763.0 - 10.0.17763.0 - 14 - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - $(VisualStudioVersion) - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x86 - false - prompt - true - - - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x86 - false - prompt - true - true - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM - false - prompt - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM - false - prompt - true - true - - - true - bin\ARM64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM64 - false - prompt - true - true - - - bin\ARM64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM64 - false - prompt - true - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x64 - false - prompt - true - - - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x64 - false - prompt - true - true - - - PackageReference - - - - - - - - - UnitTestApp.xaml - - - - - MSBuild:Compile - Designer - - - - - Designer - - - - - - - - - - - - - - - 6.2.8 - - - 1.4.0 - - - 1.4.0 - - - 2.4.1 - - - - - {15a7e2e5-2b46-4975-afbd-2898e47e5ba1} - ModernKeePassLib - - - - 14.0 - - - - \ No newline at end of file diff --git a/ModernKeePassLib.UwpTest/Package.appxmanifest b/ModernKeePassLib.UwpTest/Package.appxmanifest deleted file mode 100644 index b350b75..0000000 --- a/ModernKeePassLib.UwpTest/Package.appxmanifest +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - ModernKeePassLib.UwpTest - GeoffroyBONNEVILLE - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ModernKeePassLib.UwpTest/Properties/AssemblyInfo.cs b/ModernKeePassLib.UwpTest/Properties/AssemblyInfo.cs deleted file mode 100644 index cc4d859..0000000 --- a/ModernKeePassLib.UwpTest/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("ModernKeePassLib.UwpTest")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ModernKeePassLib.UwpTest")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: AssemblyMetadata("TargetPlatform","UAP")] - -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/ModernKeePassLib.UwpTest/Properties/Default.rd.xml b/ModernKeePassLib.UwpTest/Properties/Default.rd.xml deleted file mode 100644 index 996a839..0000000 --- a/ModernKeePassLib.UwpTest/Properties/Default.rd.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/ModernKeePassLib.UwpTest/UnitTestApp.xaml b/ModernKeePassLib.UwpTest/UnitTestApp.xaml deleted file mode 100644 index eeb9bca..0000000 --- a/ModernKeePassLib.UwpTest/UnitTestApp.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/ModernKeePassLib.UwpTest/UnitTestApp.xaml.cs b/ModernKeePassLib.UwpTest/UnitTestApp.xaml.cs deleted file mode 100644 index 41c3425..0000000 --- a/ModernKeePassLib.UwpTest/UnitTestApp.xaml.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -namespace ModernKeePassLib.UwpTest -{ - /// - /// Provides application-specific behavior to supplement the default Application class. - /// - sealed partial class App : Application - { - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() - { - this.InitializeComponent(); - this.Suspending += OnSuspending; - } - - /// - /// Invoked when the application is launched normally by the end user. Other entry points - /// will be used such as when the application is launched to open a specific file. - /// - /// Details about the launch request and process. - protected override void OnLaunched(LaunchActivatedEventArgs e) - { - -#if DEBUG - if (System.Diagnostics.Debugger.IsAttached) - { - this.DebugSettings.EnableFrameRateCounter = true; - } -#endif - - Frame rootFrame = Window.Current.Content as Frame; - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == null) - { - // Create a Frame to act as the navigation context and navigate to the first page - rootFrame = new Frame(); - - rootFrame.NavigationFailed += OnNavigationFailed; - - if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Load state from previously suspended application - } - - // Place the frame in the current Window - Window.Current.Content = rootFrame; - } - - Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI(); - - // Ensure the current window is active - Window.Current.Activate(); - - Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.Run(e.Arguments); - } - - /// - /// Invoked when Navigation to a certain page fails - /// - /// The Frame which failed navigation - /// Details about the navigation failure - void OnNavigationFailed(object sender, NavigationFailedEventArgs e) - { - throw new Exception("Failed to load Page " + e.SourcePageType.FullName); - } - - /// - /// Invoked when application execution is being suspended. Application state is saved - /// without knowing whether the application will be terminated or resumed with the contents - /// of memory still intact. - /// - /// The source of the suspend request. - /// Details about the suspend request. - private void OnSuspending(object sender, SuspendingEventArgs e) - { - var deferral = e.SuspendingOperation.GetDeferral(); - //TODO: Save application state and stop any background activity - deferral.Complete(); - } - } -} diff --git a/ModernKeePassLib/Serialization/IOConnectionInfo.cs b/ModernKeePassLib/Serialization/IOConnectionInfo.cs index c432f31..b4be643 100644 --- a/ModernKeePassLib/Serialization/IOConnectionInfo.cs +++ b/ModernKeePassLib/Serialization/IOConnectionInfo.cs @@ -25,7 +25,6 @@ using System.IO; using System.Text; using System.Xml.Serialization; #if ModernKeePassLib -using System.Threading.Tasks; using Windows.Storage; #endif