diff -r 76eb274011fd library/phpmailer/extras/ntlm_sasl_client.php --- a/library/phpmailer/extras/ntlm_sasl_client.php Wed Oct 01 14:29:58 2014 +0200 +++ b/library/phpmailer/extras/ntlm_sasl_client.php Fri Oct 17 17:15:52 2014 +0200 @@ -23,12 +23,13 @@ Function Initialize(&$client) { + if (!function_exists('hex2bin')) { function hex2bin($hex) { return pack('H*', $hex);} } if(!function_exists($function="mcrypt_encrypt") - || !function_exists($function="mhash")) + || !function_exists($function="hash")) { $extensions=array( "mcrypt_encrypt"=>"mcrypt", - "mhash"=>"mhash" + "hash"=>"hash" ); $client->error="the extension ".$extensions[$function]." required by the NTLM SASL client class is not available in this PHP configuration"; return(0); @@ -67,7 +68,7 @@ Function NTLMResponse($challenge,$password) { $unicode=$this->ASCIIToUnicode($password); - $md4=mhash(MHASH_MD4,$unicode); + $md4=hex2bin(hash('md4',$unicode)); $padded=$md4.str_repeat(chr(0),21-strlen($md4)); $iv_size=mcrypt_get_iv_size(MCRYPT_DES,MCRYPT_MODE_ECB); $iv=mcrypt_create_iv($iv_size,MCRYPT_RAND); @@ -182,4 +183,4 @@ } }; -?> \ No newline at end of file +?>