>>The 4 bytes of the CRC will probably be all right
>>
>>But this has nothing to do with the OS. Other hashing methods (MD5, SHA-*) should all calculate the same independent of OS
>>You could even use a block cipher and only store the last block as the hash
>
>They are all ok. But, since I based my CRC32 calculation based on the file size, where the file size is not different because we moved to a new OS, this is why I have this issue. So, assuming no matter the method I would have taken, it would have given a new value in the new OS.
The CRC, or any hash or encryption should be done on the file contents - not the size
>
>>To calculate a hash you have to read the whole file. Whether that file contains sparse storage or not has no influence. The file size will be the same but the number of bytes stored on disk (depending on sparse or not) may differ
>
>That is interesting. Because, in that case, CRC32 would be affected. The hash wouldn't. Thanks for the info
No. A CRC is just another hash
>
>In your experience, if calculating a hash longer to execute than a CRC32? If yes, does this increase based on the file size?
A CRC is a hash. Since the whole file has to be read in order to calculate the hash, the longer the file the longer it takes the calculate the hash
Note that the time is not that significant. I can encrypt ( Rijndael) at speeds of 25 to 35 MB/sec. And this is a block cipher with multiple rounds per block (10, 12 or 14) and lookup tables
Gregory