RE: [PHP] MD5 usage

From: Date: Tue, 22 Oct 2002 21:49:29 +0000
Subject: RE: [PHP] MD5 usage
Groups: php.general 
Request: Send a blank email to php-general+get-120989@lists.php.net to get a copy of this message
But what if I use rand(md5($prueba)1,99999); ? I can't get back the info... -----Mensaje original----- De: 1LT John W. Holmes [mailto:holmes072000@charter.net] Enviado el: martes, 22 de octubre de 2002 18:51 Para: Francisco Vaucher; php-general@lists.php.net Asunto: Re: [PHP] MD5 usage > I'm using > > $string = 'test'; > md5($string); > > to crypt $string. I get the hash output and works fine. > > Now, how do I retrieve and check that info? is there a decrypt method ? No. Use a method like this: $string = 'test'; $hash = md5($string); if(md5($string_to_test) == $hash) { echo "match"; } else { echo "no match"; } You have to compare hashes to see if the strings are equal. ---John Holmes...

« previous php.general (#120989) next »