Answer the question
In order to leave comments, you need to log in
How is a hashed password validated?
When a user registers the password using bcryptjs is hashed and this character set is written to the database. If you enter the same password several times, the hash will always be different.
Question: how to compare passwords of registered users?
Compare with the one in the database will not work because it is hashed. If you hash the user's password, it will be 2 different hashes.
I understand the question is quite simple. But understanding for some reason does not come.
Please explain.
ideally explain on bcryptjs methods
Answer the question
In order to leave comments, you need to log in
If you enter the same password several times, the hash will always be different.no. The whole point of hash functions is that, for all their irreversibility, they always produce a deterministic result, that is, in simple terms, the same output parameters are given for the same input parameters.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question