@ahiggins
NEVER store a password in plain text, but a hash only. This is how password databases work, the password of each user is hashed before storage. This needs a secure one-way hash function which does not allow to reverse calculate the original password from the hash. SHA1 or RIPEMD should be safe even nowadays, MD4 has a flaw and is not. The only computationally feasible way to retrieve the original password from the hash is by guessing, i.e. the attacker would feed random words into the hash function until the result matches the hash stored in the database. Bingo.
A standard PC can grind through a whole dictionary within a few seconds, therefore it is increasingly important to make passwords long, complex and unguessable.