note 14199 deleted from function.ldap-bind by didou

From: Date: Sun, 04 Feb 2007 19:00:06 +0000
Subject: note 14199 deleted from function.ldap-bind by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-122824@lists.php.net to get a copy of this message
Note Submitter: ral at royal dot net ---- I'm using the following code to generate 'userPassword' for OpenLDAP 1.2.x using {ssha} method (to encrypt {smd5} just change MHASH_SHA1 to MHASH_MD5) mt_srand((double) microtime()*1000000); $salt=mhash_keygen_s2k(MHASH_SHA1,$password,substr(pack("h*",md5(mt_rand())),0,8),4); $passsword="{ssha}".base64_encode(mhash(MHASH_SHA1, $password.$salt).$salt);

« previous php.notes (#122824) next »