Jump to content


Photo

HASH?


  • Please log in to reply
4 replies to this topic

#1 wannabephpdude

wannabephpdude
  • Members
  • PipPip
  • Member
  • 14 posts
  • LocationDallas

Posted 10 August 2006 - 08:01 AM

I have written a "login" system for one of my websites that works with a MySQL database and a cookie. I would like to store the password in the MySQL database encrypted (via hash). I know phpBB does it using hash some how. Does anyone know of some tutorials I can read about HASH?

Thanks in advance. PEACE.

#2 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 10 August 2006 - 08:19 AM

Check the following functions in the manual: hash(), md5() sha1().

#3 wannabephpdude

wannabephpdude
  • Members
  • PipPip
  • Member
  • 14 posts
  • LocationDallas

Posted 10 August 2006 - 09:18 AM

OK SA. I'm on it. One question though for future reference. Have you much experience using hash? I may ask you some more questions, if that's not a problem.

Thanks :)

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 August 2006 - 09:23 AM

22 years ask
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 rcharris

rcharris
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 10 August 2006 - 09:27 AM

Even though Im not the best PHP Dude, far from it, MD5 has been the best solution, I use it on all my systems.


All you have to do (if I remember, I use the same markup for all my DB's) is that you set the particular row to MD5.

To make the Login Box convert what the user types in as their password to MD5 Encryption I think you do add the following to your code (the code that follows the


// This converts the PW to MD5 Hash.

$pw_login = md5($pw_login);


Of Course Im using the variable $pw_login in the rest of my code and this bit to represent the password field.

Sorry if its all blurry, no good explaining things

_R







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users