Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-02-2009, 02:28 PM   PM User | #1
babelfish
Regular Coder

 
Join Date: Jun 2002
Location: England =)
Posts: 518
Thanks: 25
Thanked 0 Times in 0 Posts
babelfish can only hope to improve
passwords in php/mysql

hi peeps.

i have designed a new system for a client, based on a system we have currently here.

the problem is that in our system (which i administrate) i can see our passwords (due to people having the memory of a sieve) so i took out the code that encrypted/hashed/whatever-its-called passwords, so they cant be viewed.

so, how can i incorporate hiding the passwords again?

i tried password() when putting back into mysql, but then i couldnt log in with the password any more?!?!

help!!!!!!!! thanks!
__________________
"They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson
babelfish is offline   Reply With Quote
Old 02-02-2009, 02:41 PM   PM User | #2
rangana
Senior Coder

 
rangana's Avatar
 
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
rangana will become famous soon enoughrangana will become famous soon enough
You can choose from md5() or sha1().
__________________
Learn how to javascript at 02geek

The more you learn, the more you'll realize there's much more to learn
Ray.ph
rangana is offline   Reply With Quote
Users who have thanked rangana for this post:
babelfish (02-02-2009)
Old 02-02-2009, 02:59 PM   PM User | #3
babelfish
Regular Coder

 
Join Date: Jun 2002
Location: England =)
Posts: 518
Thanks: 25
Thanked 0 Times in 0 Posts
babelfish can only hope to improve
thanks mate.
__________________
"They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson
babelfish is offline   Reply With Quote
Old 02-03-2009, 06:06 AM   PM User | #4
Voltar
New to the CF scene

 
Join Date: Jan 2006
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Voltar is an unknown quantity at this point
If you have the ability to, I would use salted, hashed passwords. You could use a random individual salt for each user (new database table possibly), and concatenate the salt and password being submitted together and see if it matches the md5/sha1 sum in the database.
Voltar is offline   Reply With Quote
Old 02-03-2009, 08:16 AM   PM User | #5
babelfish
Regular Coder

 
Join Date: Jun 2002
Location: England =)
Posts: 518
Thanks: 25
Thanked 0 Times in 0 Posts
babelfish can only hope to improve
the basic one above will work fine - this isnt on the web, its just a little system to sit on a box at one of my clients. if it were web enabled i might look into more security
__________________
"They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson
babelfish is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:25 AM.


Advertisement
Log in to turn off these ads.