Re: crc check for JPEG file exists
| From: | Bojan Tesanovic | Date: | Wed, 27 Feb 2008 11:41:58 +0000 |
| Subject: | Re: crc check for JPEG file exists | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-270269@lists.php.net to get a copy of this message | ||
Don't use CRC it is not made for purpose you want, you should use some
better algo and of course MD5 is much better, though in my company we had collision
with md5 but we are working on more than a billion data set.
I have tried to use crc32 on some data and it happened to have very high
collision ...
On Feb 27, 2008, at 7:49 AM, Olav Mørkrid wrote:
hello is crc32() an acceptable way of managing whether a JPEG file exists (in a database or similar collection)? i mean doing a crc32() on the binary data of the JPEG file, and then check the database if there is already another entry with the same CRC. the database has relatively few images (some thousands). is there any chance of collision (two different JPEG images generating the same CRC) that is anywhere near likely, or is this extremely remote? advice would be appreciated. --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpBojan Tesanovic http://www.carster.us/