update many projects to .NET Standard 2.0

This commit is contained in:
schedpas
2020-09-25 09:49:03 +02:00
parent 9feaf658be
commit 1f9114dc02
37 changed files with 21 additions and 1274 deletions

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyTitle>Pilz.Cryptography</AssemblyTitle>
<Product>Pilz.Cryptography</Product>
<Copyright>Copyright © 2020</Copyright>
@@ -14,7 +14,4 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
</ItemGroup>
</Project>

View File

@@ -5,7 +5,6 @@ using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography;
using System.IO;
using Microsoft.VisualBasic.CompilerServices;
namespace Pilz.Cryptography
{
@@ -35,7 +34,11 @@ namespace Pilz.Cryptography
SHA1CryptoServiceProvider sha1CryptoServiceProvider = new SHA1CryptoServiceProvider();
byte[] bytes = TextEncoding.GetBytes(key);
byte[] array = sha1CryptoServiceProvider.ComputeHash(bytes);
return (byte[])Utils.CopyArray(array, new byte[checked(length - 1 + 1)]);
var output = new byte[checked(length - 1 + 1)];
array.CopyTo(output, 0);
return array;
}
private string EncryptData(string plaintext)