Re: [PHP] MD5 Password Login Driving me Crazy
on 18/02/03 6:42 AM, Vernon ([EMAIL PROTECTED]) wrote: > When the user goes to login into the page though I have the encrypted > password echo to the page and they match except a 52 on the end of it which > I am assuming is a space or something being picked up on submit or > something. I recall there is a way to trim the field so that it doesn't pick > up spaces but can't recall what it is. Anyone know what it is and if it > could be that? SEARCH THE MANUAL!!! http://php.net/trim Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MD5 Password Login Driving me Crazy
For what ever reason I cannot seem to get a user to login using MD5. The user creates the password on log and it works fine, password encrypted and all. I test to see if the process is working ok on creation by using the UPDATE penpals SET password = MD5(password) and the encrypted passwords match. When the user goes to login into the page though I have the encrypted password echo to the page and they match except a 52 on the end of it which I am assuming is a space or something being picked up on submit or something. I recall there is a way to trim the field so that it doesn't pick up spaces but can't recall what it is. Anyone know what it is and if it could be that? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MD5 password
On Fri, 4 May 2001, Thimo von Rauchhaupt wrote: > > Hi there assume that I had a password field in md5 format like this > > $1$uJ8d$jJKOHnfh^79824/. > > how do i compare an input password to the password that I sore in database > > > > so it can return right or wrong password > > Just compare the md5 hashed password with the md5 hashed string from the > database. If the password is like the string, the hashes must equal, too. Do _not_ store the password in the database as it is. Instead, store the md5 hash of the password and compare the md5 hash of user input with _that_. Anuradha -- http://www.bee.lk/people/anuradha/";>home page -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MD5 password
> Hi there assume that I had a password field in md5 format like this > $1$uJ8d$jJKOHnfh^79824/. > how do i compare an input password to the password that I sore in database > > so it can return right or wrong password Just compare the md5 hashed password with the md5 hashed string from the database. If the password is like the string, the hashes must equal, too. The difficult lies IMHO in hashing the password on client side. There are Javascripts-Modules out there in the Net, but this is rather unsecure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MD5 password
Get Input password into $pwd Get hashed password from db into $hashed_pwd do compare like: if (md5($pwd) == $hashed_pwd) { // good! } ""Yamin Prabudy"" <[EMAIL PROTECTED]> wrote in message 004901c0d462$ff394240$[EMAIL PROTECTED]">news:004901c0d462$ff394240$[EMAIL PROTECTED]... > Hi there assume that I had a password field in md5 format like this > $1$uJ8d$jJKOHnfh^79824/. > how do i compare an input password to the password that I sore in database > > so it can return right or wrong password > > thanks > > Yamin Prabudy > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MD5 password
Hi there assume that I had a password field in md5 format like this $1$uJ8d$jJKOHnfh^79824/. how do i compare an input password to the password that I sore in database so it can return right or wrong password thanks Yamin Prabudy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]