diff --git a/GameFrameX.Foundation.Hash/XxHashHelper.cs b/GameFrameX.Foundation.Hash/XxHashHelper.cs index 74761c6..ed0444c 100644 --- a/GameFrameX.Foundation.Hash/XxHashHelper.cs +++ b/GameFrameX.Foundation.Hash/XxHashHelper.cs @@ -96,7 +96,7 @@ public static uint Hash32(string text) public static uint Hash32(Type type) { ArgumentNullException.ThrowIfNull(type, nameof(type)); - return InternalXxHashHelper.Hash32(type); + return InternalXxHashHelper.ComputeHash32(type); } /// @@ -111,7 +111,7 @@ public static uint Hash32(Type type) /// 32位无符号整数形式的哈希值 / The 32-bit hash value as an unsigned integer public static uint Hash32() { - return InternalXxHashHelper.Hash32(); + return InternalXxHashHelper.ComputeHash32(); } /// @@ -160,7 +160,7 @@ public static ulong Hash64(string text) public static ulong Hash64(Type type) { ArgumentNullException.ThrowIfNull(type, nameof(type)); - return InternalXxHashHelper.Hash64(type); + return InternalXxHashHelper.ComputeHash64(type); } /// @@ -175,7 +175,7 @@ public static ulong Hash64(Type type) /// 64位无符号整数形式的哈希值 / The 64-bit hash value as an unsigned integer public static ulong Hash64() { - return InternalXxHashHelper.Hash64(); + return InternalXxHashHelper.ComputeHash64(); } /// @@ -480,7 +480,7 @@ private static unsafe ulong Hash64(byte* input, int length, uint seed = 0) /// 32位无符号整数形式的哈希值 / The 32-bit hash value as an unsigned integer /// 为 null 时抛出 / Thrown when is null [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint Hash32(byte[] buffer) + public static uint ComputeHash32(byte[] buffer) { ArgumentNullException.ThrowIfNull(buffer, nameof(buffer)); var length = buffer.Length; @@ -503,10 +503,10 @@ public static uint Hash32(byte[] buffer) /// 32位无符号整数形式的哈希值 / The 32-bit hash value as an unsigned integer /// 为 null 时抛出 / Thrown when is null [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint Hash32(string text) + public static uint ComputeHash32(string text) { ArgumentNullException.ThrowIfNull(text, nameof(text)); - return Hash32(Encoding.UTF8.GetBytes(text)); + return ComputeHash32(Encoding.UTF8.GetBytes(text)); } /// @@ -519,10 +519,10 @@ public static uint Hash32(string text) /// 32位无符号整数形式的哈希值 / The 32-bit hash value as an unsigned integer /// 为 null 时抛出 / Thrown when is null [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint Hash32(Type type) + public static uint ComputeHash32(Type type) { ArgumentNullException.ThrowIfNull(type, nameof(type)); - return Hash32(type.FullName); + return ComputeHash32(type.FullName); } /// @@ -532,9 +532,9 @@ public static uint Hash32(Type type) /// Computes a 32-bit hash value for a generic type. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint Hash32() + public static uint ComputeHash32() { - return Hash32(typeof(T)); + return ComputeHash32(typeof(T)); } /// @@ -547,7 +547,7 @@ public static uint Hash32() /// 64位无符号整数形式的哈希值 / The 64-bit hash value as an unsigned integer /// 为 null 时抛出 / Thrown when is null [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ulong Hash64(byte[] buffer) + public static ulong ComputeHash64(byte[] buffer) { ArgumentNullException.ThrowIfNull(buffer, nameof(buffer)); var length = buffer.Length; @@ -570,10 +570,10 @@ public static ulong Hash64(byte[] buffer) /// 64位无符号整数形式的哈希值 / The 64-bit hash value as an unsigned integer /// 为 null 时抛出 / Thrown when is null [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ulong Hash64(string text) + public static ulong ComputeHash64(string text) { ArgumentNullException.ThrowIfNull(text, nameof(text)); - return Hash64(Encoding.UTF8.GetBytes(text)); + return ComputeHash64(Encoding.UTF8.GetBytes(text)); } /// @@ -586,10 +586,10 @@ public static ulong Hash64(string text) /// 64位无符号整数形式的哈希值 / The 64-bit hash value as an unsigned integer /// 为 null 时抛出 / Thrown when is null [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ulong Hash64(Type type) + public static ulong ComputeHash64(Type type) { ArgumentNullException.ThrowIfNull(type, nameof(type)); - return Hash64(type.FullName); + return ComputeHash64(type.FullName); } /// @@ -599,9 +599,9 @@ public static ulong Hash64(Type type) /// Computes a 64-bit hash value for a generic type. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static ulong Hash64() + public static ulong ComputeHash64() { - return Hash64(typeof(T)); + return ComputeHash64(typeof(T)); } } } \ No newline at end of file