private static void encodeLong( final byte[] buf, final int offset, final int value )
    {
        buf[offset + 0] = ( byte ) ( value & 0xff );
        buf[offset + 1] = ( byte ) ( value >> 8 & 0xff );
        buf[offset + 2] = ( byte ) ( value >> 16 & 0xff );
        buf[offset + 3] = ( byte ) ( value >> 24 & 0xff );
    }
Creates the LMv2 Response from the given hash, client data, and Type 2
challenge.

@param hash
           The NTLMv2 Hash.
@param clientData
           The client data (blob or client challenge).
@param challenge
           The server challenge from the Type 2 message.

@return The response (either NTLMv2 or LMv2, depending on the client
        data).
httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/NTLMEngineImpl.java