Login   Register  
PHP Classes
elePHPant
Icontem

Password Encryption Function

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      PHP MySQL Authentication Class  >  All threads  >  Password Encryption Function  >  (Un) Subscribe thread alerts  
Subject:Password Encryption Function
Summary:Use a stronger method of protecting passwords ?
Messages:2
Author:Moore
Date:2011-05-03 09:44:10
Update:2011-05-04 10:49:26
 

  1. Password Encryption Function   Reply   Report abuse  
Picture of Moore
Moore
2011-05-03 09:44:10
Hi Saquib :)

You code looks very good, but I hope you will consider making the password encryption function more secure in future.

I don't think using Base64 and string reverse is strong enough to protect passwords, especially if someone that doesn't know anything about security decided to use this script on a live site.

A basic MD5 or sha1 hash combined with a SALT would offer much stronger protection.

You can find lots of good examples here:
http://www.php.net/manual/en/function.md5.php
http://www.php.net/manual/en/function.sha1.php
http://www.php.net/manual/en/function.hash.php

Keep up the good work.

  2. Re: Password Encryption Function   Reply   Report abuse  
Picture of Saquib Anwar
Saquib Anwar
2011-05-04 10:49:26 - In reply to message 1 from Moore
Thanks Moore for the tip. I'll consider it in my future projects.