lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php
protected function createMessage3($domain, $username, $workstation, $lmResponse, $ntlmResponse)
    {
        // Create security buffers
        $domainSec = $this->createSecurityBuffer($domain, 64);
        $domainInfo = $this->readSecurityBuffer(bin2hex($domainSec));
        $userSec = $this->createSecurityBuffer($username, ($domainInfo[0] + $domainInfo[1]) / 2);
        $userInfo = $this->readSecurityBuffer(bin2hex($userSec));
        $workSec = $this->createSecurityBuffer($workstation, ($userInfo[0] + $userInfo[1]) / 2);
        $workInfo = $this->readSecurityBuffer(bin2hex($workSec));
        $lmSec = $this->createSecurityBuffer($lmResponse, ($workInfo[0] + $workInfo[1]) / 2, true);
        $lmInfo = $this->readSecurityBuffer(bin2hex($lmSec));
        $ntlmSec = $this->createSecurityBuffer($ntlmResponse, ($lmInfo[0] + $lmInfo[1]) / 2, true);

        return self::NTLMSIG
        .$this->createByte('03') // TYPE 3 message
.$lmSec // LM response header
.$ntlmSec // NTLM response header
.$domainSec // Domain header
.$userSec // User header
.$workSec // Workstation header
.$this->createByte('000000009a', 8) // session key header (empty)
.$this->createByte('01020000') // FLAGS
.$this->convertTo16bit($domain) // domain name
.$this->convertTo16bit($username) // username
.$this->convertTo16bit($workstation) // workstation
.$lmResponse
        .$ntlmResponse;
    }
protected function createMessage3($domain, $username, $workstation, $lmResponse, $ntlmResponse)
    {
        // Create security buffers
        $domainSec = $this->createSecurityBuffer($domain, 64);
        $domainInfo = $this->readSecurityBuffer(bin2hex($domainSec));
        $userSec = $this->createSecurityBuffer($username, ($domainInfo[0] + $domainInfo[1]) / 2);
        $userInfo = $this->readSecurityBuffer(bin2hex($userSec));
        $workSec = $this->createSecurityBuffer($workstation, ($userInfo[0] + $userInfo[1]) / 2);
        $workInfo = $this->readSecurityBuffer(bin2hex($workSec));
        $lmSec = $this->createSecurityBuffer($lmResponse, ($workInfo[0] + $workInfo[1]) / 2, true);
        $lmInfo = $this->readSecurityBuffer(bin2hex($lmSec));
        $ntlmSec = $this->createSecurityBuffer($ntlmResponse, ($lmInfo[0] + $lmInfo[1]) / 2, true);

        return self::NTLMSIG
        .$this->createByte('03') // TYPE 3 message
.$lmSec // LM response header
.$ntlmSec // NTLM response header
.$domainSec // Domain header
.$userSec // User header
.$workSec // Workstation header
.$this->createByte('000000009a', 8) // session key header (empty)
.$this->createByte('01020000') // FLAGS
.$this->convertTo16bit($domain) // domain name
.$this->convertTo16bit($username) // username
.$this->convertTo16bit($workstation) // workstation
.$lmResponse
        .$ntlmResponse;
    }
protected function createMessage3 ( $ domain , $ username , $ workstation , $ lmResponse , $ ntlmResponse ) { // Create security buffers $ domainSec = $ this -> createSecurityBuffer ( $ domain , 64 ) ; $ domainInfo = $ this -> readSecurityBuffer ( bin2hex ( $ domainSec ) ) ; $ userSec = $ this -> createSecurityBuffer ( $ username , ( $ domainInfo [ 0 ] + $ domainInfo [ 1 ] ) / 2 ) ; $ userInfo = $ this -> readSecurityBuffer ( bin2hex ( $ userSec ) ) ; $ workSec = $ this -> createSecurityBuffer ( $ workstation , ( $ userInfo [ 0 ] + $ userInfo [ 1 ] ) / 2 ) ; $ workInfo = $ this -> readSecurityBuffer ( bin2hex ( $ workSec ) ) ; $ lmSec = $ this -> createSecurityBuffer ( $ lmResponse , ( $ workInfo [ 0 ] + $ workInfo [ 1 ] ) / 2 , true ) ; $ lmInfo = $ this -> readSecurityBuffer ( bin2hex ( $ lmSec ) ) ; $ ntlmSec = $ this -> createSecurityBuffer ( $ ntlmResponse , ( $ lmInfo [ 0 ] + $ lmInfo [ 1 ] ) / 2 , true ) ; return self :: NTLMSIG . $ this -> createByte ( '03' ) // TYPE 3 message . $ lmSec // LM response header . $ ntlmSec // NTLM response header . $ domainSec // Domain header . $ userSec // User header . $ workSec // Workstation header . $ this -> createByte ( '000000009a' , 8 ) // session key header (empty) . $ this -> createByte ( '01020000' ) // FLAGS . $ this -> convertTo16bit ( $ domain ) // domain name . $ this -> convertTo16bit ( $ username ) // username . $ this -> convertTo16bit ( $ workstation ) // workstation . $ lmResponse . $ ntlmResponse ; }
Create our message 3.

@param string $domain
@param string $username
@param string $workstation
@param string $lmResponse
@param string $ntlmResponse

@return string
Create our message 3 .