src/Orleans.Core.Abstractions/IDs/JenkinsHash.cs
/// <summary>
/// Computes a hash digest of the input.
/// </summary>
/// <param name="u1">
/// The first input.
/// </param>
/// <param name="u2">
/// The second input.
/// </param>
/// <param name="u3">
/// The third input.
/// </param>
/// <returns>
/// A hash digest of the input.
/// </returns>
Computes a hash digest of the input.
Computes a hash digest of the input .
public static uint ComputeHash(ulong u1, ulong u2, ulong u3)
        {
            uint a = 0x9e3779b9;
            uint b = a;
            uint c = 0;
            unchecked
            {
                a += (uint)u1;
                b += (uint)((u1 ^ (uint)u1) >> 32);
                c += (uint)u2;
                Mix(ref a, ref b, ref c);
                a += (uint)((u2 ^ (uint)u2) >> 32);
                b += (uint)u3;
                c += (uint)((u3 ^ (uint)u3) >> 32);
            }
            Mix(ref a, ref b, ref c);
            c += 24;
            Mix(ref a, ref b, ref c);
            return c;
        }
public static uint ComputeHash ( ulong u1 , ulong u2 , ulong u3 ) { uint a = 0x9e3779b9 ; uint b = a ; uint c = 0 ; unchecked { a += ( uint ) u1 ; b += ( uint ) ( ( u1 ^ ( uint ) u1 ) >> 32 ) ; c += ( uint ) u2 ; Mix ( ref a , ref b , ref c ) ; a += ( uint ) ( ( u2 ^ ( uint ) u2 ) >> 32 ) ; b += ( uint ) u3 ; c += ( uint ) ( ( u3 ^ ( uint ) u3 ) >> 32 ) ; } Mix ( ref a , ref b , ref c ) ; c += 24 ; Mix ( ref a , ref b , ref c ) ; return c ; }
Computes a hash digest of the input.
Computes a hash digest of the input .
// This implementation calculates the exact same hash value as the above, but is // optimized for the case where the input is exactly 24 bytes of data provided as // three 8-byte unsigned integers.
A hash digest of the input.
A hash digest of the input .
u1
ulong
The first input.
The first input .
u2
ulong
The second input.
The second input .
u3
ulong
The third input.
The third input .