you don't need the password, you just need a string that when hashed produces the same hash as the password e.g. the hash of "insecurepass123" has a hash of 79054025255f, which is the same hash as "%AZQ%ɟr7<[>1V4[m6S49cH͠3BW".
If you know the hash is, either will match the hash.
If you know the hash is, either will match the hash.