Translate the hash to shard id

Does this relate to How to calculate the shard id/name for given routing string??