Generates password based on the provided parameters