Is there a relatively safe way to store a password in a browser cookie (to remember login information) in a cookie without creating an additional hash column in the database? Thank.
Store salted password hash in cookie
$salt = 'snfcikkfbnvekrew'; $cookie_value = md5($salt . $password);
You should never store unencrypted or even decryptable passwords in your database, unless you have created them and the user cannot enter their own
cookie, . , , - . , , , .
" " cookie. - , " ".
cookie - . , cookie, , cookie , - cookie, , .
cookie, HTTPS , , , , .
, , - . , . , - , , , , , ( IP-, ..).
The short answer is: never store passwords in cookies or if they are not specified anywhere. Not. In your scenario, JSON web tokens (JWT) can be used to store client-side authorization.