Add function hashPassword