Adds the generatePass function and update the getters and setters.