RE: [PHP-DB] md5

From: Date: Wed, 28 Feb 2001 14:37:37 +0000
Subject: RE: [PHP-DB] md5
Groups: php.db 
Request: Send a blank email to php-db+get-7017@lists.php.net to get a copy of this message
I know there is an issue about encrypting an already encrypted string, or encrypting something twice. I believe it is against the law in the US for some algorithms (like MD5). They [they] have to be able to crack your stuff. Maybe someone can confirm? How does this relate to your problem? Well maybe md5 thinks your string has already been encrypted. Mike -----Original Message----- From: bryan [mailto:bryan@concept-factory.com] Sent: Tuesday, February 27, 2001 4:48 PM To: Joe Brown; db Subject: Re: [PHP-DB] md5 Yeah, i am aware of the 32 byte character string. As a matter of fact, I md5 the password on initial sign-up. Then just compare it to the regular password. As for this case, I am trying to update the password that is already md5 'd in the database. The problem is, I am creating a random string (with letters and numbers) and making it 10 characters long. I think md5 has a problem with this, for some reason.... Probably just me though. Thanks for the advice. bryan ----- Original Message ----- From: "Joe Brown" <joebrown@somewhere.com> To: <php-db@lists.php.net> Sent: Tuesday, February 27, 2001 12:40 PM Subject: Re: [PHP-DB] md5 > You are aware that md5() generates a 32 byte character string? > > Working on the 10 digit password request, have you alotted enough space in > your database columns to cater to a 32 byte string (64 for multibyte)? > > BTW: md5 has eaten everything I've thrown at it ;-) > > ""bryan"" <bryan@concept-factory.com> wrote in message > news:005801c0a0f1$c5c3cd40$272478cc@bryan... > I need some advice on this.... > I am creating a random password through a function. > > This creates a random password and updates it in the database. > The sql query works if I make it : > > $sql = "UPDATE members SET password='$password', verify='$verify' > WHERE > username='$username' "; > > but if I make the code (as below) with the md5, it does not. > I must be doing something wrong, or it does not like to md5 random things > or something. Any Advice? > > for ( $a=0; $a<1; $a++) { > > $password = newpwd( 10 ); > $verify = $password; > > $dbcnx = mysql_connect('localhost', 'bryan', 'fitch'); > mysql_select_db( "playtime" ); > > $sql = "UPDATE members SET password=' ".md5($password)." ', > verify=' > ".md5($verify)" ' WHERE username='$username' "; > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#7017) next »