First part of hash mechanism for passwords (not yet complete!)