Skip to content

Commit

Permalink
Remove net47
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang committed Oct 28, 2019
1 parent a13972d commit e9911be
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 26 deletions.
2 changes: 0 additions & 2 deletions neo/Cryptography/RIPEMD160Managed.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if !NET47
using System;
using System.Runtime.InteropServices;
using System.Security;
Expand Down Expand Up @@ -1051,4 +1050,3 @@ private static void DWORDToLittleEndian(byte[] block, uint[] x, int digits)
}
}
}
#endif
7 changes: 0 additions & 7 deletions neo/Cryptography/SCrypt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,6 @@ private unsafe static void SMix(byte* B, int r, int N, uint* V, uint* XY)
}
}

#if NET47
public static byte[] DeriveKey(byte[] password, byte[] salt, int N, int r, int p, int derivedKeyLength)
{
return Replicon.Cryptography.SCrypt.SCrypt.DeriveKey(password, salt, (ulong)N, (uint)r, (uint)p, (uint)derivedKeyLength);
}
#else
public unsafe static byte[] DeriveKey(byte[] password, byte[] salt, int N, int r, int p, int derivedKeyLength)
{
var Ba = new byte[128 * r * p + 63];
Expand Down Expand Up @@ -280,7 +274,6 @@ public unsafe static byte[] DeriveKey(byte[] password, byte[] salt, int N, int r

return buf;
}
#endif

private static void PBKDF2_SHA256(HMACSHA256 mac, byte[] password, byte[] salt, int saltLength, long iterationCount, byte[] derivedKey, int derivedKeyLength)
{
Expand Down
11 changes: 0 additions & 11 deletions neo/IO/Data/LevelDB/Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@ public enum CompressionType : byte

public static class Native
{
#if NET47
static Native()
{
string platform = IntPtr.Size == 8 ? "x64" : "x86";
LoadLibrary(Path.Combine(AppContext.BaseDirectory, platform, "libleveldb"));
}

[DllImport("kernel32")]
private static extern IntPtr LoadLibrary(string dllToLoad);
#endif

#region Logger
[DllImport("libleveldb", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr leveldb_logger_create(IntPtr /* Action<string> */ logger);
Expand Down
7 changes: 1 addition & 6 deletions neo/neo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyTitle>Neo</AssemblyTitle>
<Version>3.0.0-preview1</Version>
<Authors>The Neo Project</Authors>
<TargetFrameworks>netstandard2.1;net47</TargetFrameworks>
<TargetFramework>netstandard2.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Neo</AssemblyName>
<PackageId>Neo</PackageId>
Expand All @@ -17,7 +17,6 @@
<RootNamespace>Neo</RootNamespace>
<Company>The Neo Project</Company>
<Description>Neo</Description>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -34,8 +33,4 @@
<PackageReference Include="System.Text.Encodings.Web" Version="4.6.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net47'">
<PackageReference Include="Replicon.Cryptography.SCrypt" Version="1.1.6.13" />
</ItemGroup>

</Project>

0 comments on commit e9911be

Please sign in to comment.