I have a java applciation in which I want to generate long ids for strings (in order to store those strings in neo4j). In order to avoid data duplication, I wou
long
This code will calculate pretty good hash:
String s = "some string"; long hash = UUID.nameUUIDFromBytes(s.getBytes()).getMostSignificantBits();