lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php
protected function createNTLMv2Hash($password, $username, $domain, $challenge, $targetInfo, $timestamp, $client)
    {
        $ntlmHash = $this->md4Encrypt($password);
        $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain));

        // create blob
        $blob = $this->createBlob($timestamp, $client, $targetInfo);

        $ntlmv2Response = $this->md5Encrypt($ntml2Hash, $challenge.$blob);

        return $ntlmv2Response.$blob;
    }
protected function createNTLMv2Hash($password, $username, $domain, $challenge, $targetInfo, $timestamp, $client)
    {
        $ntlmHash = $this->md4Encrypt($password);
        $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain));

        // create blob
        $blob = $this->createBlob($timestamp, $client, $targetInfo);

        $ntlmv2Response = $this->md5Encrypt($ntml2Hash, $challenge.$blob);

        return $ntlmv2Response.$blob;
    }
protected function createNTLMv2Hash ( $ password , $ username , $ domain , $ challenge , $ targetInfo , $ timestamp , $ client ) { $ ntlmHash = $ this -> md4Encrypt ( $ password ) ; $ ntml2Hash = $ this -> md5Encrypt ( $ ntlmHash , $ this -> convertTo16bit ( strtoupper ( $ username ) . $ domain ) ) ; // create blob $ blob = $ this -> createBlob ( $ timestamp , $ client , $ targetInfo ) ; $ ntlmv2Response = $ this -> md5Encrypt ( $ ntml2Hash , $ challenge . $ blob ) ; return $ ntlmv2Response . $ blob ; }
Create NTLMv2 response.

@param string $password
@param string $username
@param string $domain
@param string $challenge  Hex values
@param string $targetInfo Hex values
@param string $timestamp
@param string $client     Random bytes

@return string

@see http://davenport.sourceforge.net/ntlm.html#theNtlmResponse
Create NTLMv2 response .