Re: Calculating CRC32 for uploaded files

From: Michael Vilain (vilain_at_spamcop.net)
Date: 10/08/04


Date: Thu, 07 Oct 2004 16:26:25 -0700

In article <Xns957C30E996E19rickyralexandriacc@66.250.146.159>,
 Ricky Romaya <something@somewhere.com> wrote:

> Colin McKinnon <colin.deletethis@andthis.mms3.com> wrote in
> news:ck2uel$l5m$1$8300dec7@news.demon.co.uk:
>
> > There are other hash functions, but for files of this size you'd be
> > better shelling out and running a program specifically designed for
> > the function.
> >
> Uh, the problem is I don't own the server and used a webhosting instead. If
> only I could shell out and run a file hashing program, my life will be
> easier.
>
> > crc32 is hardly the cutting edge of file hashes. MD5 works quite well
> > and is supported by must systems (and free source code is available)
> >
> Hmm, care to elaborate about what is the 'cutting edge' file hashes
> algorithm?
>
> TIA

Aren't we a lazy-ass bum this afternoon...

Doing a simple Goggle search on CRC32 and MD5 gives some choice hits:

http://us4.php.net/crc32 (this what the OP originally ask for)
http://www.freesoft.org/CIE/RFC/1510/78.htm
http://www.kb.cert.org/vuls/id/945216

http://us4.php.net/md5 (use to calculate md5 on a file)
http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html
http://www.faqs.org/rfcs/rfc1321.html

Basically, crc32 hashes aren't unique while md5 hashes are. SUN offers
md5 checksums of all the files in the Solaris distributions as a
'fingerprint' to verify if a file is authentic. That way a sysadmin can
verify if the "ls" or "ps" they're using is the original from SUN.

-- 
DeeDee, don't press that button!  DeeDee!  NO!  Dee...