I am using sha1 function to store my password in mysql DB..
$passwordHash = sha1($password);
From google I got this From user registration
sha1( sha1(users_plaintext_password)+random string )
To check
server computes sha1( users_hashed_password_in_database +
$_SESSION['random_string'] )
if $_POST['password'] ==
sha1( users_hashed_password_in_database + $_SESSION['random_string'] )
My question is how do I check for validation?Is this the correct method?? And does using some random string as salt give my password more protection??