update many projects to .NET Standard 2.0
This commit is contained in:
@@ -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>
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user