Secure Login PHP CodeIgniter -
i'm building login part of codeigniter app using simple login class starting point. it's working fine, i'm unsure of differences between encryption types, , use.
i've gone using crypt() function user's password salt (via md5), so:
$pass == crypt($_post['login_password'], md5($_post['login_password']))
is method ok, or there glaring error in approach? seems secure neither password or salt stored in database. or bit obvious?
thanks in advance.
http://php.net/manual/en/faq.passwords.php
this correct way implement passwords.
everything below irrelevant.
with have right there, simple
$pass = md5($_post['login_password'] . "somerandomchars");
will suffice in cases unless high degree of security required.
if you're using codeigniter highly suggest looking tankauth authentication plugin.
Comments
Post a Comment