Updated code to generate hashed passwords.

We should use this code to store and verify every password on the
database.