Hashes a password