driver-legacy/src/main/com/mongodb/util/Util.java
public static String hexMD5(final ByteBuffer buf, final int offset, final int len) {
        return HexUtils.hexMD5(buf, offset, len);
    }
public static String hexMD5(final ByteBuffer buf, final int offset, final int len) {
        return HexUtils.hexMD5(buf, offset, len);
    }
Produce hex representation of the MD5 digest of a byte array.

@param buf    byte buffer containing the bytes to digest
@param offset the position to start reading bytes from
@param len    the number of bytes to read from the buffer
@return hex string of the MD5 digest