Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have inserted a md5 password to my database table during registration. I have a my profile.php page which display user data that he/she entered when register. Problem is my profile page displaying user password with md5 hashed and i want to display their original password. How can i do this? I dont want to store password without md5. Help please.
Posted
Comments
Sergey Alexandrovich Kryukov 7-Oct-13 1:47am    
What do you mean by "storing password without md5"? How could it be stored "with md5" and why? Sound totally wrong.
—SA

1 solution

Not only an original password should never be displayed, it should never be stored anywhere. Authentication absolutely does not require storing a password. One possibility you should know about is the use of cryptographic hash functions. But such function should not be MD5, and not even SHA-1. Such algorithms found to be vulnerable and should not be used for security purposes. But you can use one from the SHA-2 family; SHA2 algorithms are implemented in .NET FCL. Please see:
http://en.wikipedia.org/wiki/Cryptographic_hash_function[^],
http://en.wikipedia.org/wiki/Md5[^],
http://en.wikipedia.org/wiki/Sha-1[^],
http://en.wikipedia.org/wiki/Sha-2[^],
http://msdn.microsoft.com/en-us/library/system.security.cryptography.hashalgorithm.aspx[^].

On the problem of passwords and authentication, please see also my past answers:
i already encrypt my password but when i log in it gives me an error. how can decrypte it[^],
TCP Connection with username and password[^],
Decryption of Encrypted Password[^],
storing password value int sql server with secure way[^].

—SA
 
Share this answer
 
Comments
Pankaj Mahor 7-Oct-13 2:08am    
Can u plz give me simple solution?
Sergey Alexandrovich Kryukov 7-Oct-13 2:21am    
What do you mean by "giving a solution"? What else do you need. I already described you a solution. You are the one who "gives" the solutions — to your customers, as we can only give you advice and answer your questions. Do you have a question?
—SA
Pankaj Mahor 7-Oct-13 2:30am    
i just want to show password without decrypt it.
Sergey Alexandrovich Kryukov 7-Oct-13 2:44am    
"Decrypt" would mean to unscrable something which was scrambled. Who mentioned "encryption", ever? You did not even answer what did you mean by your question. If you want to store password without any cryptography, just do it, what's the problem? But this would be unsafe.
—SA
Pankaj Mahor 7-Oct-13 3:49am    
i mean, i want to store password to table with md5 and show it back to the user without md5. How to do it?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900