J
jrefactors
I want to ask how password is stored and how to check the
authentication?
I have heard password is never encrypted and decrypted, but it is
hashed.
For example, consider a simple email logon authentication in a hash
table:
Key: my email address
Value: hash_function(my plan text password)
The hash_function will hash my password to some number.
When I logon, it will have another function to do the reverse.
If (reverse_hash_function(the password I enter on the logon screen)
== get_value(my email address))
Then Correct Password
Else Wrong Password
I don't know if this is correct. Please comment, and advise.
thanks!!
authentication?
I have heard password is never encrypted and decrypted, but it is
hashed.
For example, consider a simple email logon authentication in a hash
table:
Key: my email address
Value: hash_function(my plan text password)
The hash_function will hash my password to some number.
When I logon, it will have another function to do the reverse.
If (reverse_hash_function(the password I enter on the logon screen)
== get_value(my email address))
Then Correct Password
Else Wrong Password
I don't know if this is correct. Please comment, and advise.
thanks!!