Re: encrypting /descrypting a password

From: Date: Fri, 24 Nov 2000 10:20:05 +0000
Subject: Re: encrypting /descrypting a password
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-26929@lists.php.net to get a copy of this message
OK, but what would be the safiest solution??? MD5 , DES of mysqls password?? Tijmen On Fri, 24 Nov 2000, Mattias Segerdahl wrote: > I'd say that this is a bit overhead, when mysql has it's own function > password() > > > ----- Original Message ----- > From: "Joe Stump" <joe@earth.care2.com> > To: "Mattias Segerdahl" <mattias@bitgeeks.com> > Cc: <php-general@lists.php.net> > Sent: Friday, November 24, 2000 11:02 AM > Subject: Re: [PHP] encrypting /descrypting a password > > > > I've seen it done with md5() - just make a key, say '5643225', then take a > > person's password and concatonate the two - like this: > > > > $encrypted_pass = md5($password.$key); > > > > Then when someone logs in grab the password from the DB and put your key > on the > > end, and do the same with the entered password - if they equal each other > then > > they are good to go. > > > > This lets you store an encrypted password in a cookie easily. > > > > --JOe > > > > On Fri, Nov 24, 2000 at 10:55:18AM +0100, Mattias Segerdahl wrote: > > > I'd say go with mysql's own password() method.. > > > > > > insert method: insert into users (id,username,password) > > > values('$id','$username',password('$password')); > > > select method: select id,username,password from users where username = > > > $username and password = password('$password'); > > > > > > // Mattias aka efnet's #php bad2da > > > > > > ----- Original Message ----- > > > From: <hennink@patrijs.max.nl> > > > To: <php-general@lists.php.net> > > > Sent: Friday, November 24, 2000 10:59 AM > > > Subject: [PHP] encrypting /descrypting a password > > > > > > > > > > Hi, > > > > > > > > I'm working on a authorizationenvironment and now I've to decide how > to > > > > store my password's in Mysql. > > > > What would be the safiest solution? > > > > What if I choose des to encrypt the given password in de dbase? > > > > How could I check that when a user is logging in that the given > password > > > > is > > > > the same as the one that is encrypted because there is no decrypt to > see > > > > if the passwords match. > > > > > > > > With regards, > > > > > > > > Tijmen > > > > > > > > -- > > > > Customer: I'm running Windows '98 > > > > Tech: Yes. > > > > Customer: My computer isn't working now. > > > > Tech: Yes, you said that. > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > > For additional commands, e-mail: php-general-help@lists.php.net > > > > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > ============================================================================ > ==== > > = Joe Stump joestump98@yahoo.com > http://www.miester.org = > > > ============================================================================ > ==== > > Need a programmer? +’gc­Rº°æ”ô8 > > Ýr‡http://www.google.com/search?q=joe+stump+resume > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- Customer: I'm running Windows '98 Tech: Yes. Customer: My computer isn't working now. Tech: Yes, you said that.

« previous php.general (#26929) next »