Click here to Skip to main content
15,662,426 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hy friend's

i have a problem in SHA_512 algo. how can i differ a user password from another user.
mean's when a user "jon" enter a password "like" the the hash 512 hash it into something like this"4ssf5789sd543s" and another user "aslam" have the same password then it mean's they both have same hashe's
how can i differ it from one another.
using "salt" individually? if yes the how ?

Updated 24-May-13 19:15pm
Sergey Alexandrovich Kryukov 25-May-13 1:49am    
So what? What would be the scenario when something needs to "differ" one from another? If you think about it, you will see that there is no such thing.

1 solution

Please see my comment to the question.

Yes, but this is not a problem, because the server part stores password cache values indexed by user names. Jon and Aslam do not know that their passwords are identical unless one tried to log in representing another one with own password. Also it's important that no one would be able to find out any of original passwords (more exactly, this is what called "infeasible" in cryptography), even having the access to the storage of user names and password cache.

Share this answer
msz900 25-May-13 2:44am    
how can i add salt.. i try like this


and it work's.
is it th true process?
Sergey Alexandrovich Kryukov 25-May-13 19:26pm    
No, first parameter is algorithm, followed by data and then optional Bool:

I never tried it, but you can check with documentation:


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