static String getResponseFor(final String message, final String username, final char[] password,
            final String host, final String domain, final Certificate peerServerCertificate) throws NTLMEngineException {

        final String response;
        if (message == null || message.trim().isEmpty()) {
            response = new Type1Message(host, domain).getResponse();
        } else {
            final Type1Message t1m = new Type1Message(host, domain);
            final Type2Message t2m = new Type2Message(message);
            response = getType3Message(username, password, host, domain, t2m.getChallenge(),
                t2m.getFlags(), t2m.getTarget(), t2m.getTargetInfo(),
                peerServerCertificate, t1m.getBytes(), t2m.getBytes());
        }
        return response;
    }
Returns the response for the given message.

@param message
           the message that was received from the server.
@param username
           the username to authenticate with.
@param password
           the password to authenticate with.
@param host
           The host.
@param domain
           the NT domain to authenticate in.
@return The response.
httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/NTLMEngineImpl.java