I am working on a script and need to save passwords. For development purposes, I have been using the crypt()
function because it was easy and available. Now that I am mostly done, I want to replace it with something a little better and more consistent.
Some of the concerns I have are:
- not all algorithms are supported on every system
- sometimes the salt is pre-pended to the result (seems like a security problem)
I want something that works with PHP 4.3+.
Is there anything available, or should I stick with crypt()
? I thought about using md5(md5($password).$salt)
. Thanks for the insight.
crypt()
" and you're proposing double md5? – Anson... WHERE hashed_password = SHA1(SHA1(@password) || password_salt)
– Borgerhout