Answer the question
In order to leave comments, you need to log in
How to decode ( decode ) a hashed password ( password_hash() ) in Symfony 2?
Welcome all.
Help to deal with the situation:
1. Registration, authorization and authentication on the site - everything works.
2. The functionality works, which, when data changes (login, password, etc.), sends updated user data to the admin mail, but I can’t figure out how from hashed with password_hash( $self->getPassword(), PASSWORD_BCRYPT, array ( 'cost' => 12 ) ) of the password extract the original password itself.
Who knows, tell me. Thank you.
Answer the question
In order to leave comments, you need to log in
No way. The point of the hash is that it is impossible to get the original password from it.
Even brute force will not help you if your password length is more than 3-5 characters.
If you need the password itself, then there is only one way to get it - use it at the same time as it was received from the user, that is, send it to the admin / user in the same request as the password is regenerated.
And if the password is needed later (for example, for the password recovery function), then this will not work - the password must be recreated again.
If you have such a need, then you are doing something wrong. This algorithm was invented for this purpose, so that it could not be decoded.
And you don't need to store the password in clear text. The database will be taken away from you, and the attacker will have access to all the accounts of all your users, since many use the same login and password for all services.
Because of such craftsmen, one has to have separate passwords for dubious shit sites.
hashed password
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question