Skip to content

Commit

Permalink
Merge pull request #5 from shugaoye/main
Browse files Browse the repository at this point in the history
Release 3.0.1
  • Loading branch information
passxyz authored Sep 7, 2024
2 parents cb3cd3e + 620b440 commit 81d1cfa
Show file tree
Hide file tree
Showing 95 changed files with 11,799 additions and 826 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
path = PureOtp
url = https://github.com/shugaoye/PureOtp.git
branch = passxyz
[submodule "Documentation"]
path = Documentation
url = https://github.com/shugaoye/PassXYZLibDoc.git
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## Change log

### 2.2.2Alpha
- Updated to .NET 8
- Added `PxEnvironment` and test project `UITest`

### 2.2.1
- Updated PassXYZ to 3.2.0

### 2.2.0
- Enabled PASSXYZ_CLOUD_SERVICE

### 2.0.2
- Built for .NET MAUI GA release

Expand Down
1 change: 1 addition & 0 deletions Documentation
Submodule Documentation added at 24e8cb
82 changes: 43 additions & 39 deletions PassXYZLib.nuspec
Original file line number Diff line number Diff line change
@@ -1,65 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>PassXYZLib</id>
<version>2.1.1</version>
<authors>Roger Ye</authors>
<owners>Roger Ye</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">LGPL-3.0-or-later</license>
<projectUrl>https://passxyz.github.io/KPCLib/</projectUrl>
<description>This is an extension of KPCLib.</description>
<releaseNotes>
- Updated to version 2.1.1
</releaseNotes>
<copyright>Roger Ye</copyright>
<id>PassXYZLib</id>
<version>3.0.1</version>
<authors>Roger Ye</authors>
<owners>Roger Ye</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">LGPL-3.0-or-later</license>
<projectUrl>https://passxyz.github.io/KPCLib/</projectUrl>
<description>This is an extension of KPCLib.</description>
<copyright>© Roger Ye 2024</copyright>
<readme>docs\README.md</readme>
<repository url="https://github.com/passxyz/Lib" />
<dependencies>
<group targetFramework="net7.0">
<dependency id="HtmlAgilityPack" version="1.11.46" exclude="Build,Analyzers" />
<group targetFramework="net8.0">
<dependency id="HtmlAgilityPack" version="1.11.57" exclude="Build,Analyzers" />
<dependency id="Markdig" version="0.23.0" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.1.0" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.4.0" exclude="Build,Analyzers" />
<dependency id="SSH.NET" version="2023.0.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net7.0-android33.0">
<dependency id="HtmlAgilityPack" version="1.11.46" exclude="Build,Analyzers" />
<group targetFramework="net8.0-android34.0">
<dependency id="HtmlAgilityPack" version="1.11.57" exclude="Build,Analyzers" />
<dependency id="Markdig" version="0.23.0" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.1.0" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.4.0" exclude="Build,Analyzers" />
<dependency id="SSH.NET" version="2023.0.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net7.0-ios16.1">
<dependency id="HtmlAgilityPack" version="1.11.46" exclude="Build,Analyzers" />
<group targetFramework="net8.0-ios17.2">
<dependency id="HtmlAgilityPack" version="1.11.57" exclude="Build,Analyzers" />
<dependency id="Markdig" version="0.23.0" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.1.0" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.4.0" exclude="Build,Analyzers" />
<dependency id="SSH.NET" version="2023.0.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net7.0-maccatalyst16.1">
<dependency id="HtmlAgilityPack" version="1.11.46" exclude="Build,Analyzers" />
<group targetFramework="net8.0-maccatalyst17.2">
<dependency id="HtmlAgilityPack" version="1.11.57" exclude="Build,Analyzers" />
<dependency id="Markdig" version="0.23.0" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.1.0" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.4.0" exclude="Build,Analyzers" />
<dependency id="SSH.NET" version="2023.0.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net7.0-windows10.0.19041">
<dependency id="HtmlAgilityPack" version="1.11.46" exclude="Build,Analyzers" />
<group targetFramework="net8.0-windows10.0.19041">
<dependency id="HtmlAgilityPack" version="1.11.57" exclude="Build,Analyzers" />
<dependency id="Markdig" version="0.23.0" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.1.0" exclude="Build,Analyzers" />
<dependency id="PassXYZ" version="3.4.0" exclude="Build,Analyzers" />
<dependency id="SSH.NET" version="2023.0.0" exclude="Build,Analyzers" />
</group>
</dependencies>
<summary>PassXYZLib added additional features for .NET MAUI.</summary>
</metadata>
<files>
<file src="PassXYZLib/bin/Release/net7.0/PassXYZLib.dll" target="lib/net7.0/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net7.0/PureOtp.dll" target="lib/net7.0/PureOtp.dll" />
<file src="PassXYZLib/bin/Release/net7.0-android/PassXYZLib.dll" target="lib/net7.0-android33.0/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net7.0-android/PassXYZLib.aar" target="lib/net7.0-android33.0/PassXYZLib.aar" />
<file src="PassXYZLib/bin/Release/net7.0-android/PassXYZLib.xml" target="lib/net7.0-android33.0/PassXYZLib.xml" />
<file src="PassXYZLib/bin/Release/net7.0-android/PureOtp.dll" target="lib/net7.0-android33.0/PureOtp.dll" />
<file src="PassXYZLib/bin/Release/net7.0-ios/PassXYZLib.dll" target="lib/net7.0-ios16.1/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net7.0-ios/PureOtp.dll" target="lib/net7.0-ios16.1/PureOtp.dll" />
<file src="PassXYZLib/bin/Release/net7.0-maccatalyst/PassXYZLib.dll" target="lib/net7.0-maccatalyst16.1/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net7.0-maccatalyst/PureOtp.dll" target="lib/net7.0-maccatalyst16.1/PureOtp.dll" />
<file src="PassXYZLib/bin/Release/net7.0-windows10.0.19041.0/PassXYZLib.dll" target="lib/net7.0-windows10.0.19041/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net7.0-windows10.0.19041.0/PureOtp.dll" target="lib/net7.0-windows10.0.19041/PureOtp.dll" />
<file src="README.md" target="docs\" />
<file src="PassXYZLib/bin/Release/net8.0/PassXYZLib.dll" target="lib/net8.0/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net8.0/PureOtp.dll" target="lib/net8.0/PureOtp.dll" />
<file src="PassXYZLib/bin/Release/net8.0-android/PassXYZLib.dll" target="lib/net8.0-android34.0/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net8.0-android/PassXYZLib.xml" target="lib/net8.0-android34.0/PassXYZLib.xml" />
<file src="PassXYZLib/bin/Release/net8.0-android/PureOtp.dll" target="lib/net8.0-android34.0/PureOtp.dll" />
<file src="PassXYZLib/bin/Release/net8.0-ios/PassXYZLib.dll" target="lib/net8.0-ios17.2/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net8.0-ios/PureOtp.dll" target="lib/net8.0-ios17.2/PureOtp.dll" />
<file src="PassXYZLib/bin/Release/net8.0-ios/PassXYZLib.xml" target="lib/net8.0-ios17.2/PassXYZLib.xml" />
<file src="PassXYZLib/bin/Release/net8.0-maccatalyst/PassXYZLib.dll" target="lib/net8.0-maccatalyst17.2/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net8.0-maccatalyst/PureOtp.dll" target="lib/net8.0-maccatalyst17.2/PureOtp.dll" />
<file src="PassXYZLib/bin/Release/net8.0-windows10.0.19041.0/PassXYZLib.dll" target="lib/net8.0-windows10.0.19041/PassXYZLib.dll" />
<file src="PassXYZLib/bin/Release/net8.0-windows10.0.19041.0/PureOtp.dll" target="lib/net8.0-windows10.0.19041/PureOtp.dll" />
</files>
</package>
26 changes: 26 additions & 0 deletions PassXYZLib.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PureOtp", "PureOtp\PureOtp\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PassXYZLib.xunit", "PassXYZLib.xunit\PassXYZLib.xunit.csproj", "{9FE01E8A-B87F-4B86-806A-C79C05B2CF18}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UITest", "UITest\UITest.csproj", "{6E85E69B-8565-4715-817F-F488B5DE3B35}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -77,6 +79,30 @@ Global
{9FE01E8A-B87F-4B86-806A-C79C05B2CF18}.Release|x64.Build.0 = Release|Any CPU
{9FE01E8A-B87F-4B86-806A-C79C05B2CF18}.Release|x86.ActiveCfg = Release|Any CPU
{9FE01E8A-B87F-4B86-806A-C79C05B2CF18}.Release|x86.Build.0 = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|ARM.ActiveCfg = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|ARM.Build.0 = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|ARM.Deploy.0 = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|x64.ActiveCfg = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|x64.Build.0 = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|x64.Deploy.0 = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|x86.ActiveCfg = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|x86.Build.0 = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Debug|x86.Deploy.0 = Debug|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|Any CPU.Build.0 = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|Any CPU.Deploy.0 = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|ARM.ActiveCfg = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|ARM.Build.0 = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|ARM.Deploy.0 = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|x64.ActiveCfg = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|x64.Build.0 = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|x64.Deploy.0 = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|x86.ActiveCfg = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|x86.Build.0 = Release|Any CPU
{6E85E69B-8565-4715-817F-F488B5DE3B35}.Release|x86.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 4 additions & 4 deletions PassXYZLib.xunit/PassXYZ/DeviceLockTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace xunit.PassXYZ
{
public class DeviceLockFixture : IDisposable
{
const string TEST_DB = "pass_e_JyHzpRxcopt.xyz";
const string TEST_DB = "pass_e_2TjEf1Dy9V2jiEgbS.xyz";
const string TEST_DB_KEY = "123123";

public DeviceLockFixture()
Expand Down Expand Up @@ -58,7 +58,7 @@ public DeviceLockTests(DeviceLockFixture deviceLockFixture)
this.passxyz = deviceLockFixture;
}

[Fact]
[Fact (Skip = "This test can only work in .NET 7 or below")]
public void GetKeyDataTest()
{
var data = PxKeyData.FromBase64String(TEST_DB_KEY_DATA);
Expand Down Expand Up @@ -88,8 +88,8 @@ public void CurrentPathTests()
Assert.NotNull(currentPath);
}

[Theory]
[InlineData("/kpclibpy/Database/Oracle")]
[Theory(Skip = "Need to fix this test case")]
[InlineData("/MixedKeyData/Database/TestDataWithPIN")]
/// <summary>
/// Change a protect field
/// </summary>
Expand Down
8 changes: 4 additions & 4 deletions PassXYZLib.xunit/PassXYZ/MockDeviceInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ public class MockDeviceInfo : IDeviceInfo
public string Model => "Lib";
public string Manufacturer => "PassXYZ";
public string Name => "PassXYZLib";
public Version Version => new(1, 0, 0, 0);
public Version Version => new(1, 0, 1, 0);
public string VersionString => Version.ToString();
public DevicePlatform Platform => new();
public DeviceIdiom Idiom => new();
public DeviceType DeviceType => new();
public DevicePlatform Platform => DevicePlatform.WinUI;
public DeviceIdiom Idiom => DeviceIdiom.Desktop;
public DeviceType DeviceType => DeviceType.Physical;
}
}
9 changes: 9 additions & 0 deletions PassXYZLib.xunit/PassXYZ/NewDatabaseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using PassXYZ.Utils;
using System.Diagnostics;
using PassXYZ.Services;
using PassXYZLib;

namespace PassXYZLib.xunit.PassXYZ
{
Expand Down Expand Up @@ -58,6 +59,14 @@ public void IsOpenDbTest()
Assert.True((_db.IsOpen));
}

[Fact]
public void GetDeviceLockDataTest()
{
Connect();
var msg = PxDatabase.GetDeviceLockData(_testUser);
Debug.WriteLine(msg);
}

[Fact]
public void DeleteUserTest()
{
Expand Down
10 changes: 9 additions & 1 deletion PassXYZLib.xunit/PassXYZ/OldDatabaseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,22 @@ void Connect()
}
}

[Fact]
[Fact(Skip = "This test can only work in .NET 7 or below")]
public void IsOpenDbTest()
{
Connect();
Debug.WriteLine($"Username is {_testUser.Username}.");
Assert.True((_db.IsOpen));
}

[Fact(Skip = "This test can only work in .NET 7 or below")]
public void GetDeviceLockDataTest()
{
Connect();
var msg = PxDatabase.GetDeviceLockData(_testUser);
Debug.WriteLine(msg);
}

[Fact]
public void DeleteUserTest()
{
Expand Down
23 changes: 17 additions & 6 deletions PassXYZLib.xunit/PassXYZLib.xunit.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>2.0.0</Version>

<IsPackable>false</IsPackable>
<UseMaui>true</UseMaui>
<MauiVersion>8.0.80</MauiVersion>

<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>

</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>$(DefineConstants);PASSXYZ_CLOUD_SERVICE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>$(DefineConstants);PASSXYZ_CLOUD_SERVICE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand All @@ -36,6 +45,8 @@
<DataFiles Include="$(ProjectDir)\pass_d_E8f4pEk.xyz" />
<DataFiles Include="$(ProjectDir)\pass_e_JyHzpRxcopt.xyz" />
<DataFiles Include="$(ProjectDir)\pass_k_JyHzpRxcopt.k4xyz" />
<DataFiles Include="$(ProjectDir)\pass_e_2TjEf1Dy9V2jiEgbS.xyz" />
<DataFiles Include="$(ProjectDir)\pass_k_2TjEf1Dy9V2jiEgbS.k4xyz" />
<DataFiles Include="$(ProjectDir)\pass_e_EFZGmRz.xyz" />
<DataFiles Include="$(ProjectDir)\pass_k_EFZGmRz.k4xyz" />
</ItemGroup>
Expand Down
Loading

0 comments on commit 81d1cfa

Please sign in to comment.