How to compute modulo of a hash?
Any good hash will be uniformly distributed, which means that you can assume a uniform distribution when you apply modulo n, as long as $n &lt; 2^{M/2}$, where M is the number of bits in your hash, see here. So for SHA1-32 you would at most modulo by $2^{16}$.

There is no approach to calculating an integer value; what you have there is an hexadecimal representation of a hash, you just need to convert it to a numeric type if you obtained it as a string. XXH32() and XXH64() both already produce an unsigned int output.