public void testParanoid() { HashFn hf = new HashFn() { @Override public byte[] hash(byte[] input, int seed) { Hasher hasher = murmur3_128(seed).newHasher(); Funnels.byteArrayFunnel().funnel(input, hasher); return hasher.hash().asBytes(); } }; // Murmur3F, MurmurHash3 for x64, 128-bit (MurmurHash3_x64_128) // From http://code.google.com/p/smhasher/source/browse/trunk/main.cpp HashTestUtils.verifyHashFunction(hf, 128, 0x6384BA69); }
public void testParanoid() { HashFn hf = new HashFn() { @Override public byte[] hash(byte[] input, int seed) { Hasher hasher = murmur3_32(seed).newHasher(); Funnels.byteArrayFunnel().funnel(input, hasher); return hasher.hash().asBytes(); } }; // Murmur3A, MurmurHash3 for x86, 32-bit (MurmurHash3_x86_32) // http://code.google.com/p/smhasher/source/browse/trunk/main.cpp HashTestUtils.verifyHashFunction(hf, 32, 0xB0F57EE3); }
public void testParanoidHashBytes() { HashFn hf = new HashFn() { @Override public byte[] hash(byte[] input, int seed) { return murmur3_32(seed).hashBytes(input).asBytes(); } }; // Murmur3A, MurmurHash3 for x86, 32-bit (MurmurHash3_x86_32) // https://github.com/aappleby/smhasher/blob/master/src/main.cpp HashTestUtils.verifyHashFunction(hf, 32, 0xB0F57EE3); }
public void testParanoid() { HashFn hf = new HashFn() { @Override public byte[] hash(byte[] input, int seed) { Hasher hasher = murmur3_32(seed).newHasher(); Funnels.byteArrayFunnel().funnel(input, hasher); return hasher.hash().asBytes(); } }; // Murmur3A, MurmurHash3 for x86, 32-bit (MurmurHash3_x86_32) // https://github.com/aappleby/smhasher/blob/master/src/main.cpp HashTestUtils.verifyHashFunction(hf, 32, 0xB0F57EE3); }