开发者

how to hash the password and get it back

开发者 https://www.devze.com 2023-02-10 15:21 出处:网络
hey guys, i want to hash the password so it is totally encrypted, i am able to hash the password, but now the issue is i am not able to again get back the real password, is there any way i 开发者_Go百

hey guys, i want to hash the password so it is totally encrypted, i am able to hash the password, but now the issue is i am not able to again get back the real password, is there any way i 开发者_Go百科can get the real password using any of the hash, or is there any other way to encrypt and also decrypt the text into its original content...

Please reply as soon as possible.. Thanks and regards abbas electricwala.


Hash is a one way encryption - that's the point - not to be able to get the original information from it. Hash is meant for verifying integrity. You can check if a entered string is the correct password by hashing and comparing the hashes with the one you had before.


The whole point of hashing a password is so that you do not have to save passwords in clear text. If someone can get the hashed passwords, he can't convert them back to passwords. Also, don't forget to salt your hashing otherwise your hashed passwords are vulnerable to rainbow tables.


Hashing isn't encryption, you cannot reverse it. You use hashing to check whether someone has a specific password, without knowing the password yourself.


The idea of hash functions is, to make it impossible to reconstruct the orignal data from the hash. Furthermore there are infinite different inputs to a hash function giving the same result.

If you want to check if a password entered in, say a login form matches the valid passwort, hash the newly input password and compare the hashes.


You typically can't and shouldn't. You also hash the received password and compare the two hashes


Theoretically once the data is converted using a one-way hash function, the hashed version of the data cannot be used to recreate the original data. You may want to try a brute force attack against the hash code, using a dictionary. It naturally helps if you know which hash function has been used.

0

精彩评论

暂无评论...
验证码 换一张
取 消