Possible Duplicate:
PHP storing password in cookie
In a login system, if a user want to stay logged in, then the password needs to be stored in the browser cookie. I have been gone through many previous questions on SO, and found out that its not any secure to store the password in the browser cookie. I wonder if I do sth like
$string = 'snfcikkfbnvekrew';
$salt = md5($passwrod.$string);
$password = md5(sha1(md5("$salt$string$salt"))); //or some other random sequence of encryption functions
I'm just curious to learn what kind of attacks can be performed if someone accesses the cookie?