@Test public void testChangingKeyLength() { int[] expected = {0xa0c72f8e, 0x29c2f97e, 0x00ca8bba, 0x88387876, 0xe203ce49, 0x58d75952, 0xab84febe, 0x98153c65, 0xcbb38375, 0x6ea1a28b, 0x9afa8f55, 0xfb890eb6, 0x9516cc49, 0x6408a8eb, 0xbb12d3e6, 0x00fb7519}; for (int i = 0; i < 16; i++) { byte[] key = new byte[i]; setKey(key, i); int expectedHash = expected[i]; int hash = MurmurHash.hash(key, 0x7870AAFF); Assert.assertEquals("i = " + i, expectedHash, hash); } }
public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); }
MurmurHash { public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); } }
MurmurHash { public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); } private  MurmurHash(); }
MurmurHash { public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); } private  MurmurHash(); static int hash(byte[] data, int seed); static int hash(byte[] data, int offset, int length, int seed); static int hash(ByteBuffer buf, int seed); static long hash64A(byte[] data, int seed); static long hash64A(byte[] data, int offset, int length, int seed); static long hash64A(ByteBuffer buf, int seed); }
MurmurHash { public static int hash(byte[] data, int seed) { return hash(ByteBuffer.wrap(data), seed); } private  MurmurHash(); static int hash(byte[] data, int seed); static int hash(byte[] data, int offset, int length, int seed); static int hash(ByteBuffer buf, int seed); static long hash64A(byte[] data, int seed); static long hash64A(byte[] data, int offset, int length, int seed); static long hash64A(ByteBuffer buf, int seed);  }