summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-01-19 14:50:15 -0500
committerjim-p <jimp@pfsense.org>2012-01-19 14:50:15 -0500
commit6ac18f9d115786ad1ef6eadd907e99e097ecc3ca (patch)
treecf3e29fe854f922f55be30a6c6274e00a371d9dd
parentd9867431a47a87540a1a3a38a2474407b9d37c1f (diff)
downloadpfsense-6ac18f9d115786ad1ef6eadd907e99e097ecc3ca.zip
pfsense-6ac18f9d115786ad1ef6eadd907e99e097ecc3ca.tar.gz
mhash -> hash change from Ermal
-rw-r--r--etc/inc/auth.inc2
-rw-r--r--etc/inc/ntlm_sasl_client.inc8
2 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 2d55535..81d3058 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -496,7 +496,7 @@ function local_user_set_password(& $user, $password) {
}
// Generate the NT-HASH from the unicode string
- $user['nt-hash'] = bin2hex(mhash(MHASH_MD4, $ustr));
+ $user['nt-hash'] = bin2hex(hash("md4", $ustr));
}
function local_user_get_groups($user, $all = false) {
diff --git a/etc/inc/ntlm_sasl_client.inc b/etc/inc/ntlm_sasl_client.inc
index 406edf2..f21fcb5 100644
--- a/etc/inc/ntlm_sasl_client.inc
+++ b/etc/inc/ntlm_sasl_client.inc
@@ -19,11 +19,11 @@ class ntlm_sasl_client_class
Function Initialize(&$client)
{
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);
@@ -62,7 +62,7 @@ class ntlm_sasl_client_class
Function NTLMResponse($challenge,$password)
{
$unicode=$this->ASCIIToUnicode($password);
- $md4=mhash(MHASH_MD4,$unicode);
+ $md4=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);
@@ -177,4 +177,4 @@ class ntlm_sasl_client_class
}
};
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud