Added binary matrix hash functions.