public static long hash64()

in src/main/java/org/apache/commons/codec/digest/MurmurHash2.java [225:268]


    public static long hash64(final byte[] data, final int length, final int seed) {
        long h = seed & 0xffffffffL ^ length * M64;
        final int nblocks = length >> 3;
        // body
        for (int i = 0; i < nblocks; i++) {
            final int index = i << 3;
            long k = getLittleEndianLong(data, index);

            k *= M64;
            k ^= k >>> R64;
            k *= M64;

            h ^= k;
            h *= M64;
        }
        final int index = nblocks << 3;
        switch (length - index) {
        case 7:
            h ^= ((long) data[index + 6] & 0xff) << 48;
            // falls-through
        case 6:
            h ^= ((long) data[index + 5] & 0xff) << 40;
            // falls-through
        case 5:
            h ^= ((long) data[index + 4] & 0xff) << 32;
            // falls-through
        case 4:
            h ^= ((long) data[index + 3] & 0xff) << 24;
            // falls-through
        case 3:
            h ^= ((long) data[index + 2] & 0xff) << 16;
            // falls-through
        case 2:
            h ^= ((long) data[index + 1] & 0xff) << 8;
            // falls-through
        case 1:
            h ^= (long) data[index] & 0xff;
            h *= M64;
        }
        h ^= h >>> R64;
        h *= M64;
        h ^= h >>> R64;
        return h;
    }