This commit is contained in:
Oleksandr Melnyk 2022-06-02 15:44:01 +03:00
parent 759f74f6a4
commit 8d6f7fa43b
2 changed files with 5 additions and 7 deletions

View File

@ -208,8 +208,6 @@ namespace Standart.Hash.xxHash
*(long*)(ptrDst + 16) = *(long*)(ptrSrc + 16);
*(long*)(ptrDst + 24) = *(long*)(ptrSrc + 24);
return;
default:
break;
}
long* lpSrc = (long*)ptrSrc;
@ -244,7 +242,7 @@ namespace Standart.Hash.xxHash
ptrSrc = (byte*)lpSrc;
ptrDst = (byte*)ldSrc;
goto SMALLTABLE;
}
}
}
}
}

View File

@ -35,7 +35,7 @@ namespace Standart.Hash.xxHash
/// <param name="length">The length of the data for hashing</param>
/// <param name="seed">The seed number</param>
/// <returns>hash</returns>
public static unsafe uint128 ComputeHash(Span<byte> data, int length, uint seed = 0)
public static unsafe uint128 ComputeHash(Span<byte> data, int length, ulong seed = 0)
{
Debug.Assert(data != null);
Debug.Assert(length >= 0);
@ -54,7 +54,7 @@ namespace Standart.Hash.xxHash
/// <param name="length">The length of the data for hashing</param>
/// <param name="seed">The seed number</param>
/// <returns>hash</returns>
public static unsafe uint128 ComputeHash(ReadOnlySpan<byte> data, int length, uint seed = 0)
public static unsafe uint128 ComputeHash(ReadOnlySpan<byte> data, int length, ulong seed = 0)
{
Debug.Assert(data != null);
Debug.Assert(length >= 0);
@ -67,12 +67,12 @@ namespace Standart.Hash.xxHash
}
/// <summary>
/// Compute xxHash for the data byte span
/// Compute xxHash for the string
/// </summary>
/// <param name="str">The source of data</param>
/// <param name="seed">The seed number</param>
/// <returns>hash</returns>
public static unsafe uint128 ComputeHash(string str, uint seed = 0)
public static unsafe uint128 ComputeHash(string str, ulong seed = 0)
{
Debug.Assert(str != null);