epoxy-adapter / com.airbnb.epoxy / IdUtils / hashLong64Bit

hashLong64Bit

static fun hashLong64Bit(value: Long): Long

Hash a long into 64 bits instead of the normal 32. This uses a xor shift implementation to attempt psuedo randomness so object ids have an even spread for less chance of collisions.

From http://stackoverflow.com/a/11554034

http://www.javamex.com/tutorials/random_numbers/xorshift.shtml