http://www.cs.auckland.ac.nz/software/AlgAnim/hash_func.html