Hi,

I've written a method to hash a String into a long, like so:

Code:
private static long stringToHash(String str){
        long h = 0;

        for (int i = 0; i < str.length(); ++i)
            h = 31 * h + str.charAt(i);

        return h;
}
This works great. However, I am having difficulty working out how to go from the long back to the...