diff --git a/src/libraries/NetCoreAppLibrary.props b/src/libraries/NetCoreAppLibrary.props index a4c9e537977cd4..a3f63978bf92da 100644 --- a/src/libraries/NetCoreAppLibrary.props +++ b/src/libraries/NetCoreAppLibrary.props @@ -233,7 +233,6 @@ System.Diagnostics.PerformanceCounter; System.DirectoryServices; System.Formats.Nrbf; - System.IO.Hashing; System.IO.Packaging; System.Resources.Extensions; System.Security.Cryptography.Pkcs; diff --git a/src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj b/src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj index ce25b66a4473ce..0d64bbf0a72d7d 100644 --- a/src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj +++ b/src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.csproj @@ -9,7 +9,6 @@ - diff --git a/src/libraries/System.Formats.Nrbf/src/System.Formats.Nrbf.csproj b/src/libraries/System.Formats.Nrbf/src/System.Formats.Nrbf.csproj index 53475dec19f233..6f63aa92581d33 100644 --- a/src/libraries/System.Formats.Nrbf/src/System.Formats.Nrbf.csproj +++ b/src/libraries/System.Formats.Nrbf/src/System.Formats.Nrbf.csproj @@ -17,7 +17,6 @@ System.Formats.Nrbf.NrbfDecoder true - @@ -26,5 +25,6 @@ System.Formats.Nrbf.NrbfDecoder + diff --git a/src/libraries/System.Formats.Nrbf/src/System/Formats/Nrbf/SerializationRecordId.cs b/src/libraries/System.Formats.Nrbf/src/System/Formats/Nrbf/SerializationRecordId.cs index 5df884c2d6c564..7f51525e6e1139 100644 --- a/src/libraries/System.Formats.Nrbf/src/System/Formats/Nrbf/SerializationRecordId.cs +++ b/src/libraries/System.Formats.Nrbf/src/System/Formats/Nrbf/SerializationRecordId.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Formats.Nrbf.Utils; using System.IO; -using System.IO.Hashing; using System.Linq; using System.Runtime.InteropServices; using System.Text; @@ -45,14 +44,5 @@ internal static SerializationRecordId Decode(BinaryReader reader) public override bool Equals(object? obj) => obj is SerializationRecordId other && Equals(other); /// - public override int GetHashCode() - { - int id = _id; -#if NET - Span integers = new(ref id); -#else - Span integers = stackalloc int[1] { id }; -#endif - return (int)XxHash32.HashToUInt32(MemoryMarshal.AsBytes(integers)); - } + public override int GetHashCode() => HashCode.Combine(_id); }