refactor to use size_t
this way the mapping between hashcodes and hash definitions isn't needed also it simplfies handling, testing and allows to return error with the hash code