The exception is thrown If the $credential is not a valid bcrypt hash. In that case we assume the credential is not valid.