note 77030 added to function.md5
| From: | dionyzizatdeviantartdotcom at osu1 dot php dot net | Date: | Sat, 11 Aug 2007 19:24:00 +0000 |
| Subject: | note 77030 added to function.md5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129412@lists.php.net to get a copy of this message | ||
Sometimes it's useful to get the actual, binary, md5 digest.
You can use this function for it:
<?php
function md5bin( $target ) {
$md5 = md5( $target );
$ret = '';
for ( $i = 0; $i < 32; $i += 2 ) {
$ret .= chr( hexdec( $md5{ $i + 1 } ) + hexdec( $md5{ $i } ) * 16 );
}
return $ret;
}
?>
----
Server IP: 217.160.72.57
Probable Submitter: 85.73.120.186
----
Manual Page -- http://www.php.net/manual/en/function.md5.php
Edit -- https://master.php.net/note/edit/77030
Del: integrated -- https://master.php.net/note/delete/77030/integrated
Del: useless -- https://master.php.net/note/delete/77030/useless
Del: bad code -- https://master.php.net/note/delete/77030/bad+code
Del: spam -- https://master.php.net/note/delete/77030/spam
Del: non-english -- https://master.php.net/note/delete/77030/non-english
Del: in docs -- https://master.php.net/note/delete/77030/in+docs
Del: other reasons-- https://master.php.net/note/delete/77030
Reject -- https://master.php.net/note/reject/77030
Search -- https://master.php.net/manage/user-notes.php