Skip to content

Commit 3ea2beb

Browse files
authored
Merge pull request #13 from shugaoye/master
Release 1.3.4
2 parents 3c8f1e3 + ca1fc41 commit 3ea2beb

File tree

11 files changed

+47
-16
lines changed

11 files changed

+47
-16
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Change log
22

3+
### Release 1.3.4
4+
- Bug fixes
5+
36
### Release 1.3.3
47
- Improved property `IsUserExist` and Added `Delete` method in `User`
58
- Support KeePass key file

KPCLib.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
33
<metadata>
44
<id>KPCLib</id>
5-
<version>1.3.3.0</version>
5+
<version>1.3.4.0</version>
66
<authors>Roger Ye</authors>
77
<owners>Roger Ye</owners>
88
<requireLicenseAcceptance>false</requireLicenseAcceptance>

KPCLib.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PassXYZLib", "PassXYZLib\Pa
1111
EndProject
1212
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B5CFEC4A-7D25-4D24-B4F7-A568E1DF4750}"
1313
ProjectSection(SolutionItems) = preProject
14+
appveyor.yml = appveyor.yml
1415
CHANGELOG.md = CHANGELOG.md
1516
KPCLib.nuspec = KPCLib.nuspec
1617
PassXYZLib.nuspec = PassXYZLib.nuspec

KPCLib.xunit/PxDatabaseTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ public class PxLibInfoTests
379379
public void PxLibVersion()
380380
{
381381
Debug.WriteLine($"{PxLibInfo.Version}");
382-
Assert.Equal(PxLibInfo.Version, new System.Version("1.3.3.0"));
382+
Assert.Equal(PxLibInfo.Version, new System.Version("1.3.4.0"));
383383
}
384384

385385
[Fact]

KPCLib/KPCLib.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<OutputType>Library</OutputType>
77
<StartupObject />
88
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
9-
<Version>1.3.3</Version>
9+
<Version>1.3.4</Version>
1010
<PackageProjectUrl>https://github.com/passxyz/KPCLib</PackageProjectUrl>
1111
<RepositoryUrl>https://github.com/passxyz/KPCLib</RepositoryUrl>
1212
<Description>This is the build of KeePassLib in Xamarin Portable Class Library. Three platforms, UWP, Android and iOS, are supported and tested.</Description>
@@ -19,8 +19,8 @@
1919
- Removed dependency on PureOtp
2020
- Support KeePass key file</PackageReleaseNotes>
2121
<NeutralLanguage>en-US</NeutralLanguage>
22-
<AssemblyVersion>1.3.3.0</AssemblyVersion>
23-
<FileVersion>1.3.3.0</FileVersion>
22+
<AssemblyVersion>1.3.4.0</AssemblyVersion>
23+
<FileVersion>1.3.4.0</FileVersion>
2424
</PropertyGroup>
2525

2626
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

PassXYZLib.nuspec

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
33
<metadata>
44
<id>PassXYZLib</id>
5-
<version>1.3.3.0</version>
5+
<version>1.3.4.0</version>
66
<authors>Roger Ye</authors>
77
<owners>Roger Ye</owners>
88
<requireLicenseAcceptance>false</requireLicenseAcceptance>
99
<license type="expression">LGPL-3.0-or-later</license>
1010
<projectUrl>https://github.com/passxyz/KPCLib</projectUrl>
1111
<description>This is an extension of KPCLib.</description>
1212
<releaseNotes>
13-
- Removed dependencies
14-
- Added Delete function in Class User
13+
- Added FindEntryById()
1514
</releaseNotes>
1615
<copyright>Roger Ye</copyright>
1716
<repository url="https://github.com/passxyz/KPCLib" />

PassXYZLib/PassXYZLib.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<Version>1.3.3</Version>
6-
<AssemblyVersion>1.3.3.0</AssemblyVersion>
7-
<FileVersion>1.3.3.0</FileVersion>
5+
<Version>1.3.4</Version>
6+
<AssemblyVersion>1.3.4.0</AssemblyVersion>
7+
<FileVersion>1.3.4.0</FileVersion>
88
<Company>PassXYZ Inc.</Company>
99
<Authors>Roger Ye</Authors>
1010
<Copyright>Roger Ye</Copyright>

PassXYZLib/PxDatabase.cs

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using SkiaSharp;
88

99
using KeePassLib;
10-
using KeePassLib.Interfaces;
10+
using KeePassLib.Delegates;
1111
using KeePassLib.Keys;
1212
using KeePassLib.Security;
1313
using KeePassLib.Serialization;
@@ -326,7 +326,7 @@ public void Open(PassXYZLib.User user)
326326
}
327327
catch (PassXYZ.Services.InvalidDeviceLockException ex)
328328
{
329-
try { cmpKey.AddUserKey(new KcpKeyFile(user.KeyFileName)); }
329+
try { cmpKey.AddUserKey(new KcpKeyFile(user.KeFilePath)); }
330330
catch (Exception exFile)
331331
{
332332
Debug.Write($"{exFile} in {ex}");
@@ -540,6 +540,33 @@ PwGroup FindSubgroup(PwGroup group, string name)
540540
}
541541

542542

543+
/// <summary>
544+
/// Find an entry by Uuid
545+
/// </summary>
546+
/// <param name="uuid">The entry uuid</param>
547+
/// <returns>Entry found or return <c>null</c> if the entry cannot be found</returns>
548+
public PwEntry FindEntryById(string id)
549+
{
550+
PwEntry targetEntry = null;
551+
552+
EntryHandler eh = delegate (PwEntry pe)
553+
{
554+
PwUuid pu = pe.Uuid;
555+
string hexStr = pu.ToHexString();
556+
if (hexStr.Equals(id))
557+
{
558+
targetEntry = pe;
559+
return false;
560+
}
561+
562+
return true;
563+
};
564+
565+
RootGroup.TraverseTree(TraversalMethod.PreOrder, null, eh);
566+
567+
return targetEntry;
568+
}
569+
543570
/// <summary>
544571
/// Delete a group.
545572
/// </summary>

PassXYZLib/User.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public class User
108108
/// This is because it is difficult to manage data file in mobile devices. The actual data file is encoded
109109
/// using base58 encoding with information such as key file or device lock enabled.
110110
/// </summary>
111-
public string Username
111+
virtual public string Username
112112
{
113113
get => _username;
114114
set

PureOtp

0 commit comments

Comments
 (0)