diff --git a/PgpCore.Tests/PgpCore.Tests.csproj b/PgpCore.Tests/PgpCore.Tests.csproj index 2a4ad9b..9162663 100644 --- a/PgpCore.Tests/PgpCore.Tests.csproj +++ b/PgpCore.Tests/PgpCore.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net472;netcoreapp3.1 false diff --git a/PgpCore.Tests/UnitTests/UnitTestsAsync.cs b/PgpCore.Tests/UnitTests/UnitTestsAsync.cs index 4ecec59..0040a25 100644 --- a/PgpCore.Tests/UnitTests/UnitTestsAsync.cs +++ b/PgpCore.Tests/UnitTests/UnitTestsAsync.cs @@ -11,6 +11,17 @@ namespace PgpCore.Tests { public class UnitTestsAsync { + private static class File + { + public static FileStream Create(string path) => System.IO.File.Create(path); + public static bool Exists(string path) => System.IO.File.Exists(path); +#if NETFRAMEWORK + public static Task ReadAllTextAsync(string path) => Task.FromResult(System.IO.File.ReadAllText(path)); +#else + public static Task ReadAllTextAsync(string path) => System.IO.File.ReadAllTextAsync(path); +#endif + } + [Fact] public async Task GenerateKeyAsync_CreatePublicPrivateKeyFiles() { diff --git a/PgpCore/PgpCore.csproj b/PgpCore/PgpCore.csproj index 6581f40..00fe141 100644 --- a/PgpCore/PgpCore.csproj +++ b/PgpCore/PgpCore.csproj @@ -1,8 +1,8 @@  - netstandard2.1;netcoreapp2.2;netcoreapp3.1 - .NET Standard and Core class library for using PGP + netstandard2.0 + .NET Standard class library for using PGP mattosaurus PgpCore diff --git a/README.md b/README.md index 669744d..013f142 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A .NET Core class library for using PGP. -This is based on ChoPGP but updated to .NET Core framework and to add in a missing utilities class. +This is based on ChoPGP but updated to .NET Standard and to add in a missing utilities class. # Installation To use PgpCore in your C# project, you can either download the PgpCore C# .NET libraries directly from the Github repository or, if you have the NuGet package manager installed, you can grab them automatically. @@ -20,12 +20,10 @@ Add the following namespaces to use the library: using PgpCore; ``` # Dependencies -BouncyCastle.NetCore (>= 1.8.1.3) - -Microsoft.NETCore.App (>= 1.1.2) +* Portable.BouncyCastle (>= 1.8.6.7) # Usage -This is intended for usage in .NET Core projects, the latest version that works with .NET Framework is v2.2.0. +This is intended for usage in projects [targeting .NET Standard 2.0](https://dotnet.microsoft.com/platform/dotnet-standard#versions). ## Methods