问题
I am using vBulletin and the login uses this to cross-refer to the database.
md5(md5($pass).$salt)
How do i make a PHP script such that every password input will automatically be hashed and salted as well so that it is able to authenticate with the vBulletin database ?
回答1:
Because hashing is not encrypting, hashes can't be reversed.
If you want to be able to reverse passwords, you have to use an encryption function.
回答2:
How to reverse hashed and salted password ?
Hashing is a one-way process. i.e. If you pass a string you get a hash which cannot be reversed., It can be used for comparison purposes.
Some of the hashing algorithms are md5()
[not considered secure] , sha-1
, sha-256
Best Hashing as of now...
Make use of crypt() coupled with some strong salt. If you have PHP 5.5 , then you can very well make use of password_hash()
回答3:
Just use the code you posted. Get the form data and wrap it in the appropriate md5() function.
来源:https://stackoverflow.com/questions/20760183/how-to-reverse-hashed-and-salted-password