Class HashingFunctions

    • Constructor Detail

      • HashingFunctions

        public HashingFunctions()
    • Method Detail

      • hash32x86

        public static int hash32x86​(byte[] data)
        Generates 32-bit hash from the byte array with a seed of zero. This is a helper method that will produce the same result as:
         int offset = 0;
         int seed = 0;
         int hash = MurmurHash3.hash32x86(data, offset, data.length, seed);
         
        Parameters:
        data - The input byte array
        Returns:
        The 32-bit hash
        Since:
        1.14
        See Also:
        hash32x86(byte[], int, int, int)
      • hash32x86

        public static int hash32x86​(byte[] data,
                                    int offset,
                                    int length,
                                    int seed)
        Generates 32-bit hash from the byte array with the given offset, length and seed.

        This is an implementation of the 32-bit hash function MurmurHash3_x86_32 from from Austin Applyby's original MurmurHash3 c++ code in SMHasher.

        Parameters:
        data - The input byte array
        offset - The offset of data
        length - The length of array
        seed - The initial seed value
        Returns:
        The 32-bit hash
        Since:
        1.14