note 24091 deleted from function.md5 by jimw
| From: | jimw@php.net | Date: | Sat, 08 Feb 2003 19:49:42 +0000 |
| Subject: | note 24091 deleted from function.md5 by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-43642@lists.php.net to get a copy of this message | ||
Here's what slappasswd does:
base64_encode(
hex2bin(
md5(string)
)
)
Where hex2bin (from bin2hex user notes) is:
function hex2bin($data) {
$len = strlen($data);
for($i=0;$i<$len;$i+=2) {
$newdata .= pack("C",hexdec(substr($data,$i,2)));
}
return $newdata;
}