It is a string function that returns a 32-character md5 hash of "password." MD5 is the name for a current RSA Message Digest Algorithm encryption method. A search in the manual for md5 gets you to the little bit of information in the manual plus a link to RFC 1321 which likely provides more information than you want. Doug On Thu, 4 Mar 2004 15:35:52 -0500, Kevin wrote: >Hi Doug and All, > >I am real new to PHP and wanted to know if you can explain the >[md5("password");] code? Is this a set function? > >Thanks, >Kevin > >----- Original Message ----- > >> On Thu, 04 Mar 2004 12:46:51 -0600, Mignon Hunter wrote: >> >> >Can anyone recommend, or does anyone have handy, a script that will >encrypt passwords AND then also be able to retrieve the encrypted password. >> > >> >Checking out the docs and some books has confused me mostly. >> > >> >Thx >> > >> >> Yes and no. >> >> $pw = md5("password"); works well. >> >> However, you cannot decrypt. >> >> You store $pw (above) in the database and when a user wants to log in, you >encrypt their entry and compare it to the value -- also encrypted -- stored >in the db. If there is a match, they get in; but you have no knowledge of >their password(s). Neither does anyone else who hacks in. >> >> hth, >> Doug >> > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php