public SignedElectionOptions(List<ElectionOption> electionOptions, Date endTime)
	{
		for(int i = 0; i < electionOptions.size(); i++) {
			if(electionOptions.get(i).getElectionOptionId() != i) {
				//TODO: throw correct exception.
				throw new RuntimeException();
			}
		}
		
		this.electionOptions = electionOptions;
		this.signature = Security.sign(Security.getBulletinBoardRSAPrivateKey(), Converter.toByteArray(endTime.getTime()));
	}