How to generate hash keys for chess positions Is there a standardized method for generation of hash keys for chess positions. I want to implement hash key generation in my program, so wanted to know the best way to do it.
It would be great if someone can provide details on how the opening books do their hashing (.bin?).

Thanks!
I believe you're talking about Zobrist Hashing.


  a technique to transform a board position of arbitrary size into a number of a set length, with an equal distribution over all possible numbers


https://chessprogramming.wikispaces.com/Zobrist+Hashing

Why Zobrist?


Rather than computing the hash for the entire board every time, the hash value of a board can be updated simply by XORing out the bitstring(s) for positions that have changed. That makes the hashing algorithm very efficient for chess engines.