Aug
15th

Password Security in PHP

Files under My Life, PHP, databases, hacking, programming | Posted by Clint Lenard

I’ve been big on Security over the past 6 months or so and I’ve pretty much adopted the Chris Shiflett method of securing User Passwords. It just seems to work for me mentally and physically - meaning I don’t feel stressed out about Passwords being stolen as easily.
Example:

$clean = array();

$clean['username'] = $_POST['username'];

$clean['password'] = $_POST['password'];

$salt = ‘CLENARD’;

$password = $salt . md5($clean['password'] . $salt);

?>

Of course that’s a simple example and one that Chris Shiflett explains in several examples but it’s pretty similar to what I’ve been using.

How do you secure your passwords? How do you filter your Data? I’m no PHP Expert and never claimed to be… but I love hearing how others secure their passwords. I used to use SHA1 because people claimed md5 reverse engineering was easy to do, which I no longer believe. I’ve tried many “engines” to test MD5 hashes and only one password actually worked out of hundreds I’ve tried. ;)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Post a Comment