Simple hashing functions.