Regardless of whether you store your data in a database or a file, storing the passwords as
plain text is an unnecessary risk.A one-way hashing algorithm can provide better security
with very little extra effort.
PHP provides a number of one-way hash functions.The oldest and least secure is the
Unix Crypt algorithm, provided by the function crypt().The Message Digest 5 (MD5)
algorithm, implemented in the function md5(), is stronger.
Stronger yet is the Secure Hash Algorithm 1 (SHA-1.) The PHP function sha1()
provides a strong, one-way cryptographic hash function.