RE: [PHP] Crypt problem

From: Date: Thu, 22 Mar 2001 23:04:07 +0000
Subject: RE: [PHP] Crypt problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45204@lists.php.net to get a copy of this message
you dont... as far as i know, crypt only works on <= 8 chars it will truncate anything over 8. perhaps try using md5 or mcrypt... > -----Original Message----- > From: Randy Johnson [mailto:programmer@jennybug.com] > Sent: Thursday, March 22, 2001 4:33 PM > To: php-general@lists.php.net > Subject: [PHP] Crypt problem > > > hello > > I use crypt to crypt member's passwords and use the following verify > > > "$stored_password" is the encrypted, stored password. > > "$password" is the plain text password you just got from the form. > > ## Check the passwords > $encrypted_password = crypt($password,$stored_password); > > if ($encrypted_password = $stored_password) { $logged_in = 1; }; > > > the problem I am having is that it is only comparing the first 8 characters > of the password > > so if my password was randyrandy > > i could get in with randyran > > How do I fix this > > the crypt password is stored in the database with enough room to store the > password so it isn't cutting it off when inserting to the database. > > thanks > > randy > > > -- > 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 >

« previous php.general (#45204) next »