BSR Hash Calculation

I couldn’t find much information on how the Bootstrap Router hash function is calculated. Most sources teach that the mask dictates how much of the group IP address is used in the hash calculation and that the RP IP address that returns the highest value from the BSR hash algorithm becomes the chosen RP for