forked from benadida/scantegrity-audit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilenames.py
75 lines (58 loc) · 2.23 KB
/
filenames.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
"""
filenames for individual audit files
Ben Adida
2009-10-10
"""
import hashlib
# first meeting
MEETING_ONE_IN = "MeetingOneIn.xml"
MEETING_ONE_OUT = "MeetingOneOut.xml"
ELECTION_SPEC = "ElectionSpec.xml"
PARTITIONS = "partitions.xml"
# second meeting
MEETING_TWO_IN = "MeetingTwoIn.xml"
MEETING_TWO_OUT = "MeetingTwoOut.xml"
MEETING_TWO_OUT_COMMITMENTS = "MeetingTwoOutCommitments.xml"
MEETING_TWO_RANDOM_DATA = "pre-election-random-data.txt"
def set_meeting_two_random_data(relative_filename):
"Set a non-default value for the random data for meeting 2"
global MEETING_TWO_RANDOM_DATA
MEETING_TWO_RANDOM_DATA = relative_filename
# third meeting
MEETING_THREE_IN = "MeetingThreeIn.xml"
MEETING_THREE_OUT = "MeetingThreeOut.xml"
MEETING_THREE_OUT_CODES = "MeetingThreeOutCodes.xml"
def go_provisional():
# oh I feel dirty, but this is what happens when a new piece of the process is introduced without warning
global MEETING_THREE_IN
global MEETING_THREE_OUT
global MEETING_THREE_OUT_CODES
# third meeting with provisional ballots
MEETING_THREE_IN = "MeetingThreeIn-Provisional-Manual.xml"
MEETING_THREE_OUT = "MeetingThreeOut-Provisional-Manual.xml"
MEETING_THREE_OUT_CODES = "MeetingThreeOutCodes-Provisional-Manual.xml"
def reset():
# oh I feel dirty, but this is what happens when a new piece of the process is introduced without warning
global MEETING_THREE_IN
global MEETING_THREE_OUT
global MEETING_THREE_OUT_CODES
MEETING_THREE_IN = "MeetingThreeIn.xml"
MEETING_THREE_OUT = "MeetingThreeOut.xml"
MEETING_THREE_OUT_CODES = "MeetingThreeOutCodes.xml"
# fourth meeting
MEETING_FOUR_IN = "MeetingFourIn.xml"
MEETING_FOUR_OUT = "MeetingFourOut.xml"
MEETING_FOUR_RANDOM_DATA = "post-election-random-data.txt"
def set_meeting_four_random_data(relative_filename):
"Set a non-default value for the random data for meeting 4"
global MEETING_FOUR_RANDOM_DATA
MEETING_FOUR_RANDOM_DATA = relative_filename
# contested ballots
CONTESTED_BALLOTS_REPLY = "ReplyToContestedCodes.xml"
# spoiled ballots
SPOILED_BALLOTS_CODES = "SpoiledBallotsCodes.xml"
SPOILED_BALLOTS_MIXNET = "SpoiledBallotsMixnet.xml"
# unused ballots
UNUSED_BALLOTS_CODES = "PrintAuditBallots.xml"
UNUSED_BALLOTS_MIXNET = "PrintAuditMixnet.xml"