Since Java 8 you can use
Long.hashCode(guid);
For older versions of Java you can use the following:
Long.valueOf(guid).hashCode();
Note that this solution creates a new Object for the stack, while the first doesn’t (although it is likely that Java optimizes the object creation away..)
Looking at the docs, both ways just use the following algorithm:
(int)(this.longValue()^(this.longValue()>>>32))
These are decent solutions since they make use of the Java library – always better to leverage off of something that has been tested already.