Can CRC32 be used as a hash function? Any drawbacks to this approach? Any tradedeoffs?
CRC32 maps bytes to 32-bit integers, before accumulating them with xor. That means each byte affects only 8 out of 32 bits in your hash. Of course CRC32 does shifting too, but it only hides the problem under the rug. I.e. it will distribute keys unevenly, there will be heavy clustering at some region. It may appear such hash works fine, until you hit that region, and suddenly your O(1) hash table turns into the O(n) one.
CRC32 was designed for detecting damaged files, not hashing. And as Mark mentioned it wont protect your files from modification, since hackers can still modify them at will by just inserting a properly crafted 32bit value after the change.