Some hashing functions for CPP