ravi suthar wrote:
if i will store hashcode() of password instead of password string,
next time for verification of password how i get password String from hashcode(),
First of all, as Anayonkar already said,
you should not store the Java hashCode() of the password string - instead, use a cryptographically strong hashing algorithm such as SHA-256. The Java hashCode() and hashing algorithms are not the same kind of thing, although they both use the
word "hash". Don't confuse them!
For the second part, you cannot get the password back if you just have the hashCode(), or if you have a hash from an algorithm such as SHA-256. Hashing algorithms are designed to work one way only: you can compute the hash over some data, but it is not possible to get the original data back if you only have the hash.
For password verification, you do not need to get the original password back from the hash. How it usually works is this: user enters a password to login, you compute the hash over what the user entered, and then you compare that hash with the hash that you have in the database. If they are equal, then what the user entered was the correct password.