common/src/main/java/HTTPClient/DefaultAuthHandler.java
/**
     * Calculates the NTLM response. See
     * ftp://samba.anu.edu.au/pub/samba/docs/ENCRYPTION.txt more info.
     *
     * @param hpw   the hashed password
     * @param nonce the nonce from the server
     * @return the response String
     */
Calculates the NTLM response.

@param hpw   the hashed password
@param nonce the nonce from the server
@return the response String
Calculates the NTLM response . @param hpw the hashed password @param nonce the nonce from the server @return the response String
private static byte[] calc_ntcr_resp(byte[] hpw, byte[] nonce)
    {
	byte[] resp  = new byte[24],
	       crypt = new byte[8];
	int[] ks = setup_key(hpw, 0);
	DES.des_ecb_encrypt(nonce, crypt, ks, true);
	System.arraycopy(crypt, 0, resp, 0, 8);
	ks = setup_key(hpw, 7);
	DES.des_ecb_encrypt(nonce, crypt, ks, true);
	System.arraycopy(crypt, 0, resp, 8, 8);
	ks = setup_key(hpw, 14);
	DES.des_ecb_encrypt(nonce, crypt, ks, true);
	System.arraycopy(crypt, 0, resp, 16, 8);
	return resp;
    }
private static byte [ ] calc_ntcr_resp ( byte [ ] hpw , byte [ ] nonce ) { byte [ ] resp = new byte [ 24 ] , crypt = new byte [ 8 ] ; int [ ] ks = setup_key ( hpw , 0 ) ; DES . des_ecb_encrypt ( nonce , crypt , ks , true ) ; System . arraycopy ( crypt , 0 , resp , 0 , 8 ) ; ks = setup_key ( hpw , 7 ) ; DES . des_ecb_encrypt ( nonce , crypt , ks , true ) ; System . arraycopy ( crypt , 0 , resp , 8 , 8 ) ; ks = setup_key ( hpw , 14 ) ; DES . des_ecb_encrypt ( nonce , crypt , ks , true ) ; System . arraycopy ( crypt , 0 , resp , 16 , 8 ) ; return resp ; }
Calculates the NTLM response.
Calculates the NTLM response .
// do the DES encryptions // done