Retrieving password when the password stored as a hash value

前端 未结 8 914
遥遥无期
遥遥无期 2021-01-05 14:15

Can users request that their password be emailed to themselves if the password is stored as a hash value?

Is there any way to convert a hash value to the clear text

相关标签:
8条回答
  • 2021-01-05 14:42

    If there was a simple way to recover the clear-text password, there would be no point in hashing the passwords to begin with. At that point you might as well just base64 or ROT13 them. (don't do that!)

    As others mentioned, use other password recovery methods. There really is never a good reason to have access to clear-text passwords.

    If the hash at two sites is the same, the user most likely has the same password at both. Not 100% guaranteed however, there could be a hash collision, but that is hugely improbable.

    0 讨论(0)
  • 2021-01-05 14:43

    The general idea behind storing a hash of a password is to ensure the passwords are secure...even from those who have access to the database. Trust is never implicit. A hash is a one-way algorithm, so there is no way to derive the original password from a hashcode. Usually, when a user needs to recover their password that was stored as a hash, you should ask them their secret question, and either email them their temporary password, or email them a temporary link where they can change their password. This ensures that the password is never stored clear text, and is secure from all prying eyes, even those who might be assumed to be trustworthy.

    0 讨论(0)
提交回复
热议问题