PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Oct 17, 2019 6:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Pasword Salt
PostPosted: Tue Oct 11, 2011 11:55 am 
Offline
Forum Contributor
User avatar

Joined: Sat Nov 20, 2010 10:00 pm
Posts: 241
Location: GA, USA
I'm getting a membership site put up soon, and I already have user registrations and logins. I hash the passwords using sha1, but how do i salt my passwords for extra security?

_________________
- Kaleb Klein
------------------------------------
Web Developer | Software Developer

PGP Key:


Top
 Profile  
 
 Post subject: Re: Pasword Salt
PostPosted: Thu Oct 13, 2011 1:44 am 
Offline
DevNet Resident
User avatar

Joined: Sun Sep 03, 2006 5:19 am
Posts: 1579
Location: Sofia, Bulgaria
Check the article/discussion in my sig and come back for questions ;)


Top
 Profile  
 
 Post subject: Re: Pasword Salt
PostPosted: Thu Oct 13, 2011 5:43 am 
Offline
Forum Regular
User avatar

Joined: Wed Apr 30, 2008 2:34 am
Posts: 794


Top
 Profile  
 
 Post subject: Re: Pasword Salt
PostPosted: Thu Nov 10, 2011 2:36 am 
Offline
Forum Newbie

Joined: Wed Nov 09, 2011 8:32 am
Posts: 5
You can use
Syntax: [ Download ] [ Hide ]
$md5_password=md5(md5($pasword).'salt');
 

:P


Top
 Profile  
 
 Post subject: Re: Pasword Salt
PostPosted: Thu Nov 10, 2011 2:43 am 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887

_________________
Image


Top
 Profile  
 
 Post subject: Re: Pasword Salt
PostPosted: Thu Nov 10, 2011 2:51 am 
Offline
DevNet Resident
User avatar

Joined: Sun Sep 03, 2006 5:19 am
Posts: 1579
Location: Sofia, Bulgaria
While technically this is true, the increased chance of a collision is still so very very close to zero. With passwords we mostly care for the "one-way" property, not the "hard-to-collide" property of the hash functions.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group