Page 1 of 1
How do you store data? eg. passwords?
Posted: Sun Apr 23, 2006 5:57 am
by m0u53m4t
Say I wanted to make a php file that when someone enters their username and password in a form hashes it and compares it to the already hashed stored password, what kind of file would the hashed password have to be in?
Re: How do you store data? eg. passwords?
Posted: Sun Apr 23, 2006 7:45 am
by Chris Corbyn
m0u53m4t wrote:Say I wanted to make a php file that when someone enters their username and password in a form hashes it and compares it to the already hashed stored password, what kind of file would the hashed password have to be in?
Don't use a file, use a database. If you do need to use a file then make sure you place it somewhere outside of the web root, although on many shared hosts other people will still be able to read this file using php.
Posted: Sun Apr 23, 2006 8:34 am
by m0u53m4t
If the passwords are stored hashed anyway, whats the problem? Anyway, I'll use a database... So how do I make a database for it?
Posted: Sun Apr 23, 2006 10:55 am
by John Cartwright
You have so many different threads about hashing passwords! Stick to one!
Posted: Sun Apr 23, 2006 11:03 am
by Chris Corbyn
m0u53m4t wrote:If the passwords are stored hashed anyway, whats the problem? Anyway, I'll use a database... So how do I make a database for it?
Just because data is hashed doesn't mean you can make your list of users and passwords publically accessible.... they'd be brute forced/tunnelled pretty quickly.
Read up on MySQL or PostgreSQL if you want to learn how to use a database
