note 24075 deleted from function.md5 by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Wed, 07 Aug 2002 19:47:55 +0000 |
| Subject: | note 24075 deleted from function.md5 by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34479@lists.php.net to get a copy of this message | ||
Has anyone tried using the md5 function to create a userPassword attribute in OpenLDAP?
I compared the output of the slappasswd to that of the PHP md5 function for the same secret and they
were radically different (even excluding the hash algorithm notation). My test is below.
slappasswd -h {MD5} -s toby
{MD5}iCLSou/iMfpvzltxHfPcfA==
<?php
echo md5(toby);
?>
8822d2a2efe231fa6fce5b711df3dc7c
I know I can probably use the mHash library, but PHP on RH7.3 didn't have it compiled in and
rather not go there unless I have to...
It's probably a difference in how the salt is selected, but I'm just guessing. Surely,
someone has done this before.
And by the way, according to RFC 2256, you're not actually supposed to hash the password in
this attribute, but every one usually does.