Ok, I need a hashing function to meet the following requirements. The idea is to be able to link together directories that are part of the same logical structure but stored in different physical areas of the file system.
I need to implement it in Java, it must be consistent across execution sessions and it can return a long.
I will be hashing directory names / strings. This should work so that "somefolder1"
and "somefolder2"
will return different hashes, as would "JJK"
and "JJL"
. I'd also like some idea of when clashes are likely to occur.
Any suggestions?
Thanks