difference between CRC and HashCode
i was wondering wheather there is a difference between a crc value and a HashCode. the definition of both seems the same.
"if 2 objects are equal the hashcode/must be equal, if the objects differ the crc/hashcode *should* be different to improve performance."
i have another question: how can i calculate a 64 or 128 bit crc? are there classes to do this or have i program this functionality myself?
[418 byte] By [
codymanix] at [2007-9-27 22:41:56]

CRC may be used for calculating the hashcode.
CRC is calculated by a precise algorithm, while the hashcode can be anything that's respecting the definition.
In java, I think, the standard hashcode is simply based on the memory position.
But this is only the standard hashcode, when implementing your own, you might very well use CRC for it.
The CRC is calculated based on the content of the file and a mask.
I dont know a standard way for calculating 64bit CRC in Java, when your going to implement it yourself, search the net for a good mask to use.