not necessarily a good idea. It's possible that two files will have the same hash. And in that case your program would not work correctly whenever the rare case occurs that the hash function returns the same hash for two files.
If it's just for the purpose of storing it in a table, I would not use a hash function at all. I would just use a simple incrementing index for each file. |