A Privacy-Preserving Method With Flexible Charging Schedules For Electric Vehicles In The Smart Grid