note 79265 added to function.md5-file
| From: | toby at globaloptima dot co dot uk | Date: | Sun, 18 Nov 2007 20:15:42 +0000 |
| Subject: | note 79265 added to function.md5-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132384@lists.php.net to get a copy of this message | ||
I'm wondering about the MD5_DIR function posted by potsed, what happens if the file listing is
returned in a different order?
From what I can tell you get different MD5's based on the order, a minor addition sorts this:
...
asort($filemd5s); //sort the md5s before concat
return md5(implode('', $filemd5s));
}
----
Server IP: 194.145.210.4
Probable Submitter: 81.155.3.34
----
Manual Page -- http://www.php.net/manual/en/function.md5-file.php
Edit -- https://master.php.net/note/edit/79265
Del: integrated -- https://master.php.net/note/delete/79265/integrated
Del: useless -- https://master.php.net/note/delete/79265/useless
Del: bad code -- https://master.php.net/note/delete/79265/bad+code
Del: spam -- https://master.php.net/note/delete/79265/spam
Del: non-english -- https://master.php.net/note/delete/79265/non-english
Del: in docs -- https://master.php.net/note/delete/79265/in+docs
Del: other reasons-- https://master.php.net/note/delete/79265
Reject -- https://master.php.net/note/reject/79265
Search -- https://master.php.net/manage/user-notes.php