Esempio n. 1
0
def verifyVote(votes):
	"""Verifies all votes"""
	for vote in votes:
		value = cryptography.asymmetricVerify(vote.plainText, vote.certificate, vote.publicKey.publicKey)
		if value == False:
			print(error)			
	return value
Esempio n. 2
0
def verifyVote(votes):
	"""Verifies all votes"""
	for vote in votes:
		value = cryptography.asymmetricVerify(vote.plainText, vote.certificate, vote.publicKey.publicKey)
		if value == False:
			print(error)			
	return value
Esempio n. 3
0
def verifyVote():
	"""Verifies all votes"""
	votes = Votes.objects.all()
	text = []
	certi = []
	publickey = []
	verified = []
	result = True
	for vote in votes:
		value = cryptography.asymmetricVerify(vote.plainText, vote.certificate, vote.publicKey.publicKey)
		text += [vote.plainText]
		certi += [vote.certificate]
		publickey += [vote.publicKey.publicKey]
		verified += [result]
		if value == False:
			print error
			result = False

	excelfunc.votestoexcel(text,certi,publickey,verified,result)
	return result
Esempio n. 4
0
def verifyVote():
	"""Verifies all votes"""
	votes = Votes.objects.all()
	text = []
	certi = []
	publickey = []
	verified = []
	result = True
	for vote in votes:
		value = cryptography.asymmetricVerify(vote.plainText, vote.certificate, vote.publicKey.publicKey)
		text += [vote.plainText]
		certi += [vote.certificate]
		publickey += [vote.publicKey.publicKey]
		verified += [result]
		if value == False:
			print error
			result = False

	excelfunc.votestoexcel(text,certi,publickey,verified,result)
	return result