Go implementation of java's hashCode function.