public static int basicHashCode(final ByteBuffer byteBuffer) {
        int hash = 1;

        int pos = byteBuffer.position();
        int limit = byteBuffer.limit();
        for (int i = pos; i < limit; ++i) {
            hash = 31 * hash + byteBuffer.get(i);
        }
        return hash;
    }
Generate a fast non-crypto 64bit hash of the passed buffer
stroom-bytebuffer/src/main/java/stroom/bytebuffer/ByteBufferUtils.java