Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 105 additions & 105 deletions apps/electionguard-cli/ElectionGuard.CLI.sln
Original file line number Diff line number Diff line change
@@ -1,105 +1,105 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32519.379
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4DDF806F-023D-4917-B855-E5959DE468BD}"
ProjectSection(SolutionItems) = preProject
icon.png = icon.png
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectionGuard.CLI", "ElectionGuard.CLI.csproj", "{0771316F-7C71-4795-90DF-705EC63442ED}"
ProjectSection(ProjectDependencies) = postProject
{DC80E980-829A-4AFF-BB29-AAA594A4118B} = {DC80E980-829A-4AFF-BB29-AAA594A4118B}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectionGuard.Encryption.Utils", "..\..\bindings\netstandard\ElectionGuard\ElectionGuard.Encryption.Utils\ElectionGuard.Encryption.Utils.csproj", "{9CF2608E-9B97-4E21-B5B7-C59E2435B110}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectionGuard.Encryption", "..\..\bindings\netstandard\ElectionGuard\ElectionGuard.Encryption\ElectionGuard.Encryption.csproj", "{DC80E980-829A-4AFF-BB29-AAA594A4118B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectionGuard.ElectionSetup", "..\..\bindings\netstandard\ElectionGuard\ElectionGuard.ElectionSetup\ElectionGuard.ElectionSetup.csproj", "{507D524F-0911-4575-8991-C36741FD5A46}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectionGuard.Decryption", "..\..\bindings\netstandard\ElectionGuard\ElectionGuard.Decryption\ElectionGuard.Decryption.csproj", "{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
Debug|arm64 = Debug|arm64
Release|arm64 = Release|arm64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|x64.ActiveCfg = Debug|x64
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|x64.Build.0 = Debug|x64
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|x86.ActiveCfg = Debug|x86
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|x86.Build.0 = Debug|x86
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|x64.ActiveCfg = Release|x64
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|x64.Build.0 = Release|x64
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|x86.ActiveCfg = Release|x86
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|x86.Build.0 = Release|x86
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|arm64.ActiveCfg = Debug|arm64
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|arm64.Build.0 = Debug|arm64
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|arm64.ActiveCfg = Release|arm64
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|arm64.Build.0 = Release|arm64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|x64.ActiveCfg = Debug|x64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|x64.Build.0 = Debug|x64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|x86.ActiveCfg = Debug|x86
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|x86.Build.0 = Debug|x86
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|x64.ActiveCfg = Release|x64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|x64.Build.0 = Release|x64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|x86.ActiveCfg = Release|x86
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|x86.Build.0 = Release|x86
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|arm64.ActiveCfg = Debug|arm64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|arm64.Build.0 = Debug|arm64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|arm64.ActiveCfg = Release|arm64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|arm64.Build.0 = Release|arm64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|x64.ActiveCfg = Debug|x64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|x64.Build.0 = Debug|x64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|x86.ActiveCfg = Debug|x86
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|x86.Build.0 = Debug|x86
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|x64.ActiveCfg = Release|x64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|x64.Build.0 = Release|x64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|x86.ActiveCfg = Release|x86
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|x86.Build.0 = Release|x86
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|arm64.ActiveCfg = Debug|arm64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|arm64.Build.0 = Debug|arm64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|arm64.ActiveCfg = Release|arm64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|arm64.Build.0 = Release|arm64
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|x64.ActiveCfg = Debug|x64
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|x64.Build.0 = Debug|x64
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|x86.ActiveCfg = Debug|x86
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|x86.Build.0 = Debug|x86
{507D524F-0911-4575-8991-C36741FD5A46}.Release|x64.ActiveCfg = Release|x64
{507D524F-0911-4575-8991-C36741FD5A46}.Release|x64.Build.0 = Release|x64
{507D524F-0911-4575-8991-C36741FD5A46}.Release|x86.ActiveCfg = Release|x86
{507D524F-0911-4575-8991-C36741FD5A46}.Release|x86.Build.0 = Release|x86
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|arm64.ActiveCfg = Debug|arm64
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|arm64.Build.0 = Debug|arm64
{507D524F-0911-4575-8991-C36741FD5A46}.Release|arm64.ActiveCfg = Release|arm64
{507D524F-0911-4575-8991-C36741FD5A46}.Release|arm64.Build.0 = Release|arm64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|x64.ActiveCfg = Debug|x64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|x64.Build.0 = Debug|x64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|x86.ActiveCfg = Debug|x86
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|x86.Build.0 = Debug|x86
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|x64.ActiveCfg = Release|x64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|x64.Build.0 = Release|x64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|x86.ActiveCfg = Release|x86
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|x86.Build.0 = Release|x86
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|arm64.ActiveCfg = Debug|arm64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|arm64.Build.0 = Debug|arm64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|arm64.ActiveCfg = Release|arm64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|arm64.Build.0 = Release|arm64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {44312322-DEA7-4BDE-8930-AFEAB72CA425}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.TextStylePolicy = $3
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32519.379
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4DDF806F-023D-4917-B855-E5959DE468BD}"
ProjectSection(SolutionItems) = preProject
icon.png = icon.png
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectionGuard.CLI", "ElectionGuard.CLI.csproj", "{0771316F-7C71-4795-90DF-705EC63442ED}"
ProjectSection(ProjectDependencies) = postProject
{DC80E980-829A-4AFF-BB29-AAA594A4118B} = {DC80E980-829A-4AFF-BB29-AAA594A4118B}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectionGuard.Encryption.Utils", "..\..\bindings\netstandard\ElectionGuard\ElectionGuard.Encryption.Utils\ElectionGuard.Encryption.Utils.csproj", "{9CF2608E-9B97-4E21-B5B7-C59E2435B110}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectionGuard.Encryption", "..\..\bindings\netstandard\ElectionGuard\ElectionGuard.Encryption\ElectionGuard.Encryption.csproj", "{DC80E980-829A-4AFF-BB29-AAA594A4118B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectionGuard.ElectionSetup", "..\..\bindings\netstandard\ElectionGuard\ElectionGuard.ElectionSetup\ElectionGuard.ElectionSetup.csproj", "{507D524F-0911-4575-8991-C36741FD5A46}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectionGuard.Decryption", "..\..\bindings\netstandard\ElectionGuard\ElectionGuard.Decryption\ElectionGuard.Decryption.csproj", "{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
Debug|arm64 = Debug|arm64
Release|arm64 = Release|arm64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|x64.ActiveCfg = Debug|x64
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|x64.Build.0 = Debug|x64
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|x86.ActiveCfg = Debug|x86
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|x86.Build.0 = Debug|x86
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|x64.ActiveCfg = Release|x64
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|x64.Build.0 = Release|x64
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|x86.ActiveCfg = Release|x86
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|x86.Build.0 = Release|x86
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|arm64.ActiveCfg = Debug|arm64
{0771316F-7C71-4795-90DF-705EC63442ED}.Debug|arm64.Build.0 = Debug|arm64
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|arm64.ActiveCfg = Release|arm64
{0771316F-7C71-4795-90DF-705EC63442ED}.Release|arm64.Build.0 = Release|arm64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|x64.ActiveCfg = Debug|x64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|x64.Build.0 = Debug|x64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|x86.ActiveCfg = Debug|x86
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|x86.Build.0 = Debug|x86
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|x64.ActiveCfg = Release|x64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|x64.Build.0 = Release|x64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|x86.ActiveCfg = Release|x86
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|x86.Build.0 = Release|x86
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|arm64.ActiveCfg = Debug|arm64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Debug|arm64.Build.0 = Debug|arm64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|arm64.ActiveCfg = Release|arm64
{9CF2608E-9B97-4E21-B5B7-C59E2435B110}.Release|arm64.Build.0 = Release|arm64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|x64.ActiveCfg = Debug|x64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|x64.Build.0 = Debug|x64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|x86.ActiveCfg = Debug|x86
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|x86.Build.0 = Debug|x86
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|x64.ActiveCfg = Release|x64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|x64.Build.0 = Release|x64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|x86.ActiveCfg = Release|x86
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|x86.Build.0 = Release|x86
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|arm64.ActiveCfg = Debug|arm64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Debug|arm64.Build.0 = Debug|arm64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|arm64.ActiveCfg = Release|arm64
{DC80E980-829A-4AFF-BB29-AAA594A4118B}.Release|arm64.Build.0 = Release|arm64
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|x64.ActiveCfg = Debug|x64
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|x64.Build.0 = Debug|x64
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|x86.ActiveCfg = Debug|x86
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|x86.Build.0 = Debug|x86
{507D524F-0911-4575-8991-C36741FD5A46}.Release|x64.ActiveCfg = Release|x64
{507D524F-0911-4575-8991-C36741FD5A46}.Release|x64.Build.0 = Release|x64
{507D524F-0911-4575-8991-C36741FD5A46}.Release|x86.ActiveCfg = Release|x86
{507D524F-0911-4575-8991-C36741FD5A46}.Release|x86.Build.0 = Release|x86
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|arm64.ActiveCfg = Debug|arm64
{507D524F-0911-4575-8991-C36741FD5A46}.Debug|arm64.Build.0 = Debug|arm64
{507D524F-0911-4575-8991-C36741FD5A46}.Release|arm64.ActiveCfg = Release|arm64
{507D524F-0911-4575-8991-C36741FD5A46}.Release|arm64.Build.0 = Release|arm64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|x64.ActiveCfg = Debug|x64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|x64.Build.0 = Debug|x64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|x86.ActiveCfg = Debug|x86
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|x86.Build.0 = Debug|x86
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|x64.ActiveCfg = Release|x64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|x64.Build.0 = Release|x64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|x86.ActiveCfg = Release|x86
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|x86.Build.0 = Release|x86
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|arm64.ActiveCfg = Debug|arm64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Debug|arm64.Build.0 = Debug|arm64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|arm64.ActiveCfg = Release|arm64
{7EC2EFE1-834D-40DC-BD93-50FBCD95FDCC}.Release|arm64.Build.0 = Release|arm64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {44312322-DEA7-4BDE-8930-AFEAB72CA425}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.TextStylePolicy = $3
EndGlobalSection
EndGlobal
158 changes: 79 additions & 79 deletions apps/electionguard-cli/Generate/PlainTally.cs
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
namespace ElectionGuard.CLI.Generate
{
public class PlainTally
{
public List<Contest> contests { get; set; } = new();
public string object_id { get; set; }
public string style_id { get; set; }
public void Clear()
{
foreach (Contest contest in contests)
{
contest.Clear();
}
}
public static PlainTally operator +(PlainTally left, PlainTally right)
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;

namespace ElectionGuard.CLI.Generate
{


public class PlainTally
{
public List<Contest> contests { get; set; } = new();
public string object_id { get; set; }
public string style_id { get; set; }

public void Clear()
{
foreach (Contest contest in contests)
{
contest.Clear();
}
}
public static PlainTally operator +(PlainTally left, PlainTally right)
{
foreach (var contest in right.contests)
{
var l = left.contests.SingleOrDefault(c => c.object_id == contest.object_id);
if (l != null)
{
l += contest;
if (l != null)
{
l += contest;
}
else
{
left.contests.Add(contest);
else
{
left.contests.Add(contest);
}
}
return left;
}
}
public class Contest
{
public List<Ballot_Selections> ballot_selections { get; set; } = new();
public string object_id { get; set; }
public void Clear()
{
}
return left;
}
}

public class Contest
{
public List<Ballot_Selections> ballot_selections { get; set; } = new();
public string object_id { get; set; }

public void Clear()
{
foreach (var selection in ballot_selections)
{
selection.Clear();
}
}
public static Contest operator +(Contest left, Contest right)
{
}
}

public static Contest operator +(Contest left, Contest right)
{
foreach (var selection in right.ballot_selections)
{
var l = left.ballot_selections.SingleOrDefault(b => b.object_id == selection.object_id);
if (l != null)
{
l += selection;
if (l != null)
{
l += selection;
}
else
{
left.ballot_selections.Add(selection);
else
{
left.ballot_selections.Add(selection);
}
}
return left;
}
}
public class Ballot_Selections
{
public bool is_placeholder_selection { get; set; }
public string object_id { get; set; }
public int vote { get; set; }
public string write_in { get; set; }
public void Clear()
{
vote = 0;
}
public static Ballot_Selections operator +(Ballot_Selections left, Ballot_Selections right)
{
left.vote += right.vote;
return left;
}
}
}
}
return left;
}
}

public class Ballot_Selections
{
public bool is_placeholder_selection { get; set; }
public string object_id { get; set; }
public int vote { get; set; }
public string write_in { get; set; }

public void Clear()
{
vote = 0;
}

public static Ballot_Selections operator +(Ballot_Selections left, Ballot_Selections right)
{
left.vote += right.vote;
return left;
}
}
}
Loading