Jump to content

salomon

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

salomon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yeah ken, but I do however not use any salts since I can't seem to get them to work. I plainly use crypt() and that's all. Thank you Xeno you seem to know where I'm getting from here. I kinda wanted to confirm if you COULD compare crypted passes to eachother or not, but as you said it would only work for comparing plain text passes to crypted, as I already can do. At the moment believe it or not, I actually store PLAINTEXT passwords as cookies. Dumb eh? That's why I would want to make it at least crypted if it's going to be in the cookie. I checked your link, but it does not seem to work hmm.
  2. I already told you that crypt() is never the same, you cannot just compare to passwords like that sorry.
  3. I'm very dissapointed and thought this site would be much more helpful. this is like the third time I bump this topic
  4. Does really no one know how to solve this? oh well
  5. Okay, so I got a huge problem. I'm quite new at this cookie thing so...Anyway I got a login page saving the password and username you enter as cookies right. Everything is connected to a MSQL database. I currently use following code for saving my cookies: $password=crypt($insertpassword); setcookie("uname", "$userid", time()+9999999999999999999999999, "/", "$HTTP_HOST", 0); setcookie("pword", "$password", time()+9999999999999999999999999, "/", "$HTTP_HOST", 0); This works perfectly fine for me and the password cookie is successfully crypted and saved. BUT here comes the part I have been terribly stuck on for 2 days now: On next page I have coded so it will check if the password cookie is correct when compared to the password of the user in the database. The password saved in the database is also crypted. Now, the thing we all know with crypt() is that it generates codes randomly, so simply checking if the cookie value for the password is exactly the same as the one in db surely won't work since they will always be different. Also, as it seems, using "if(crypt($cookie,$userspword)==$userspword" won't work either since both the passwords are already crypted. So...how would one do if I wanted to compare the crypted password of the cookie to the crypted password in the user's row in the database? Thank you very much in advance and for reading this.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.