I think the poster may be a beginner, and the final problem he wants to solve is how to change the password. This question is just a problem that arises when changing the password. Since the idea of changing the password is wrong, the question deviates from the direction.
However, when I saw the long replies from the people above, I just caught on to a knowledge point that beginners don’t understand. The result may be that the poster doesn’t even understand what you are talking about. No solution or possible solution to the problem is given at all.
The solution to this problem is:
You first set up 3 input boxes
Then the first one is to let the user enter the original password.
The second and third input boxes are used to allow users to enter new passwords and confirm new passwords.
After submission, compare the user’s original password using the previous encryption method such as your md5 encryption with the encrypted password stored in the database. If they are the same, it means that the original password is correct. It can be determined that the user's identity is legitimate. (As for why this is the case, because md5 is irreversible, so we will just encrypt it again. Compare it with you. The same password should be encrypted the same.)
If the user's identity is legitimate, you should know that the new password is encrypted and saved. N lines of verification code are omitted here.
First of all, it is recommended that the subject should search first if he encounters a problem. Secondly, MD5 is an irreversible encryption algorithm. If the project needs to change the password, the password entered by the user will be md5 encrypted and then the key will be matched. If you just want to restore MD5, there are many online decryption methods on the Internet, but they can only decrypt relatively simple passwords.
Finally, I suggest the question author close this question, it is really meaningless , thank you
In principle, it is not possible, md5 is one-way encryption. During verification, the md5 values are also compared to see if they are the same. If you want to crack it, you can download the data from the ready-made rainbow table, but the result is not guaranteed to be 100%. It will take a long time to hit md5 on the spot.
This is basically impossible. Decryption on the Internet depends on chance. If you are lucky, you may encounter the same md5 value and corresponding string. Moreover, md5 values do not correspond to strings one-to-one. The md5 values of many strings are the same...
md5 cannot be restored. Otherwise, there is no need to brute force it, just restore it directly. It is recommended to search for the salted PBKDF2 algorithm.
MD5 is designed so that it cannot be restored. Every time you verify, you need to convert the password to 32 bits, and then compare it with the 32 bits stored in the database;
I think the poster may be a beginner, and the final problem he wants to solve is how to change the password. This question is just a problem that arises when changing the password. Since the idea of changing the password is wrong, the question deviates from the direction.
However, when I saw the long replies from the people above, I just caught on to a knowledge point that beginners don’t understand. The result may be that the poster doesn’t even understand what you are talking about. No solution or possible solution to the problem is given at all.
The solution to this problem is:
You first set up 3 input boxes
Then the first one is to let the user enter the original password.
The second and third input boxes are used to allow users to enter new passwords and confirm new passwords.
After submission, compare the user’s original password using the previous encryption method such as your md5 encryption with the encrypted password stored in the database. If they are the same, it means that the original password is correct. It can be determined that the user's identity is legitimate. (As for why this is the case, because md5 is irreversible, so we will just encrypt it again. Compare it with you. The same password should be encrypted the same.)
If the user's identity is legitimate, you should know that the new password is encrypted and saved. N lines of verification code are omitted here.
Okay
MD5
根本就不是加密算法
好不好。。。。MD5
是摘要算法
。。。 而摘要算法
理论上讲是不需要逆向解码
.First of all, it is recommended that the subject should search first if he encounters a problem.
Secondly, MD5 is an irreversible encryption algorithm. If the project needs to change the password, the password entered by the user will be md5 encrypted and then the key will be matched. If you just want to restore MD5, there are many online decryption methods on the Internet, but they can only decrypt relatively simple passwords.
Finally, I suggest the question author close this question, it is really meaningless , thank you
Oh my God~
I scared the baby to death~
You actually want to
解密
~User that gets
旧密码
和新密码
.Encrypt
旧密码
md5.Compare the encrypted
旧密码
with the database password.If the same, then encrypt
新密码
md5 and store it in the database.The digest algorithm is not so easy to reverse.
Of course you can use the online md5 decryption tool.
In principle, it is not possible, md5 is one-way encryption. During verification, the md5 values are also compared to see if they are the same. If you want to crack it, you can download the data from the ready-made rainbow table, but the result is not guaranteed to be 100%. It will take a long time to hit md5 on the spot.
This is basically impossible. Decryption on the Internet depends on chance. If you are lucky, you may encounter the same md5 value and corresponding string. Moreover, md5 values do not correspond to strings one-to-one. The md5 values of many strings are the same...
It is impossible to restore, but it is possible to try to collide
The questioner can search on Baidu to find out what
MD5
,它是一种不可逆的算法。可逆的比如Base64
and other algorithms are.md5 cannot be restored. Otherwise, there is no need to brute force it, just restore it directly.
It is recommended to search for the salted PBKDF2 algorithm.
MD5 is designed so that it cannot be restored. Every time you verify, you need to convert the password to 32 bits, and then compare it with the 32 bits stored in the database;