note 25894 added to ref.ldap
| From: | gerbille at free dot fr | Date: | Thu, 10 Oct 2002 11:26:20 +0000 |
| Subject: | note 25894 added to ref.ldap | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37885@lists.php.net to get a copy of this message | ||
The MD5 of PHP returns a result encoded in base16. But the LDAP MD5 returns a string encoded in
base64.
$pwd="toto";
$pwd_md5=base64_encode(mhash(MHASH_MD5,$pwd));
Just add "{MD5}" front $pwd_md5 to obtain the same format as LDAP directory.
Bye
Aurélia
--
http://www.php.net/manual/en/ref.ldap.php
http://master.php.net/manage/user-notes.php?action=edit+25894
http://master.php.net/manage/user-notes.php?action=delete+25894
http://master.php.net/manage/user-notes.php?action=reject+25894