Updated to net9.0
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<StartupObject>BNetServer.Server</StartupObject>
|
||||
<ApplicationIcon>Red.ico</ApplicationIcon>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Framework\Framework.csproj" />
|
||||
|
||||
@@ -262,10 +262,7 @@ namespace Framework.Cryptography.Ed25519
|
||||
// Leading zero bytes get encoded as leading `1` characters
|
||||
int leadingZeroCount = input.TakeWhile(c => c == '1').Count();
|
||||
var leadingZeros = Enumerable.Repeat((byte)0, leadingZeroCount);
|
||||
var bytesWithoutLeadingZeros =
|
||||
intData.ToByteArray()
|
||||
.Reverse()// to big endian
|
||||
.SkipWhile(b => b == 0);//strip sign byte
|
||||
var bytesWithoutLeadingZeros = intData.ToByteArray(true, true);
|
||||
var result = leadingZeros.Concat(bytesWithoutLeadingZeros).ToArray();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<Import Project="..\..\default.props" />
|
||||
<PropertyGroup>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -24,7 +24,9 @@ namespace Framework.IO
|
||||
deflateStream.Flush();
|
||||
}
|
||||
buffer.WriteBytes(ms.ToArray());
|
||||
buffer.WriteBytes(BitConverter.GetBytes(adler32).Reverse().ToArray());
|
||||
var adlerBytes = BitConverter.GetBytes(adler32);
|
||||
adlerBytes.Reverse();
|
||||
buffer.WriteBytes(adlerBytes);
|
||||
|
||||
return buffer.GetData();
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ namespace System
|
||||
public static string ToHexString(this byte[] byteArray, bool reverse = false)
|
||||
{
|
||||
if (reverse)
|
||||
return byteArray.Reverse().Aggregate("", (current, b) => current + b.ToString("X2"));
|
||||
else
|
||||
return byteArray.Aggregate("", (current, b) => current + b.ToString("X2"));
|
||||
byteArray.Reverse();
|
||||
|
||||
return byteArray.Aggregate("", (current, b) => current + b.ToString("X2"));
|
||||
}
|
||||
|
||||
public static byte[] ToByteArray(this string str, bool reverse = false)
|
||||
@@ -40,7 +40,10 @@ namespace System
|
||||
string temp = String.Concat(str[i * 2], str[i * 2 + 1]);
|
||||
res[i] = Convert.ToByte(temp, 16);
|
||||
}
|
||||
return reverse ? res.Reverse().ToArray() : res;
|
||||
if (reverse)
|
||||
res.Reverse();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public static byte[] ToByteArray(this string value, char separator)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<Import Project="..\..\default.props" />
|
||||
<PropertyGroup>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<ApplicationIcon>Blue.ico</ApplicationIcon>
|
||||
<StartupObject>WorldServer.Server</StartupObject>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputPath>../../Build/$(Configuration)/$(Platform)</OutputPath>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
||||
<AppendRuntimeIdentifierToOutputPath>False</AppendRuntimeIdentifierToOutputPath>
|
||||
|
||||
Reference in New Issue
Block a user