Password hashing code.