lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php
protected function createLMv2Password($password, $username, $domain, $challenge, $client)
    {
        $lmPass = '00'; // by default 00
        // if $password > 15 than we can't use this method
        if (strlen($password) <= 15) {
            $ntlmHash = $this->md4Encrypt($password);
            $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain));

            $lmPass = bin2hex($this->md5Encrypt($ntml2Hash, $challenge.$client).$client);
        }

        return $this->createByte($lmPass, 24);
    }
protected function createLMv2Password($password, $username, $domain, $challenge, $client)
    {
        $lmPass = '00'; // by default 00
        // if $password > 15 than we can't use this method
        if (strlen($password) <= 15) {
            $ntlmHash = $this->md4Encrypt($password);
            $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain));

            $lmPass = bin2hex($this->md5Encrypt($ntml2Hash, $challenge.$client).$client);
        }

        return $this->createByte($lmPass, 24);
    }
protected function createLMv2Password ( $ password , $ username , $ domain , $ challenge , $ client ) { $ lmPass = '00' ; // by default 00 // if $password > 15 than we can't use this method if ( strlen ( $ password ) <= 15 ) { $ ntlmHash = $ this -> md4Encrypt ( $ password ) ; $ ntml2Hash = $ this -> md5Encrypt ( $ ntlmHash , $ this -> convertTo16bit ( strtoupper ( $ username ) . $ domain ) ) ; $ lmPass = bin2hex ( $ this -> md5Encrypt ( $ ntml2Hash , $ challenge . $ client ) . $ client ) ; } return $ this -> createByte ( $ lmPass , 24 ) ; }
Create LMv2 response.

@param string $password
@param string $username
@param string $domain
@param string $challenge NTLM Challenge
@param string $client    Random string

@return string
Create LMv2 response .