static String formatHex(final byte[] binaryData) {
        final int n = binaryData.length;
        final char[] buffer = new char[n * 2];
        for (int i = 0; i < n; i++) {
            final int low = binaryData[i] & 0x0f;
            final int high = (binaryData[i] & 0xf0) >> 4;
            buffer[i * 2] = HEXADECIMAL[high];
            buffer[(i * 2) + 1] = HEXADECIMAL[low];
        }
        return new String(buffer);
    }
Encodes a byte array digest into a hexadecimal string.
<p>
This method supports digests of various lengths, such as 16 bytes (128-bit) for MD5,
32 bytes (256-bit) for SHA-256, and SHA-512/256. Each byte is converted to two
hexadecimal characters, so the resulting string length is twice the byte array length.
</p>

@param binaryData the array containing the digest bytes
@return encoded hexadecimal string, or {@code null} if encoding failed
httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/DigestScheme.java