Jump to content
xisto Community
Sign in to follow this  
eskimmer

Passwords Passwords

Recommended Posts

Well using crypt wouldnt "hash" anything i would encrypt it as i understand. I would usually use MD5 to has a password, the only thing is once hashed you cant see the original password, this doesnt matter really though as to validate the password you store the hashed version in a DB and then hash the users input so that if correct the two hashes would match exactly. That way even if the site is compromised by a hacker and they get access to the DB they still cant see the passwords either!

Share this post


Link to post
Share on other sites

I would use MD5 too, I forget the php function that can actually hash a password to md5, but yea, it's an easy way to do it; however, it's not hard to find a program that will crack the hash if a hacker find the hashed password so don't make the hash easy to find.

Share this post


Link to post
Share on other sites

Check out the following code:

<?php$password = "PASSWORD";	 // Any password$crypt = md5($password);	   // You will get a md5 hash of your supplied string/* * You can insert the data in to table and check with the entered password during login */?>

md5() returns a 32 character long string which is always unique and same for the supplied argument.

If you need more help the post

Notice from rvalkass:

Any code you post must be placed in CODE tags.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.