Added a helper function for computing a hashed password