Use existing builtin hashing functions to make this routine more
simple.