docs: private static void updateLengthAndBytes(MessageDigest digest, String str) throws UnsupportedEncodingException {
          byte[] utf8Encoded = str.getBytes(UTF8);
          ByteBuffer lengthBytes = ByteBuffer.allocate(INTEGER_SIZE_IN_BYTES).putInt(utf8Encoded.length);
          digest.update(lengthBytes.array());
          digest.update(utf8Encoded);
      }