class which convert a string to an integer hash