Bug/max ballots (#54)
* update submodule reference * when loading max ballots, sanitize output * update project reference update version
This commit is contained in:
Родитель
1344f24b13
Коммит
6259a57664
|
@ -1 +1 @@
|
|||
Subproject commit 7f59e712a5230d5a1bfbe261cade1730df4d01c8
|
||||
Subproject commit 3115c412ece99dc5e19635995d049d4206bb217e
|
|
@ -12,7 +12,7 @@
|
|||
<RepositoryUrl>https://github.com/microsoft/ElectionGuard-SDK-CSharp.git</RepositoryUrl>
|
||||
<PackageProjectUrl>https://github.com/microsoft/ElectionGuard-SDK</PackageProjectUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<VersionPrefix>1.0.3</VersionPrefix>
|
||||
<VersionPrefix>1.0.4</VersionPrefix>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\LICENSE">
|
||||
|
|
|
@ -173,9 +173,11 @@ namespace ElectionGuard.SDK
|
|||
var result = new LoadBallotsResult()
|
||||
{
|
||||
ExternalIdentifiers = externalIdentifiers
|
||||
.Select(s => Marshal.PtrToStringAnsi(s))
|
||||
.Select(p => Marshal.PtrToStringAnsi(p))
|
||||
.Where(s => !string.IsNullOrWhiteSpace(s))
|
||||
.ToList(),
|
||||
EncryptedBallotMessages = encryptedBallotMessages
|
||||
.Where(p => p.Length > 0)
|
||||
.Select(p => ByteSerializer.ConvertToBase64String(p))
|
||||
.ToList()
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using ElectionGuard.SDK;
|
||||
using ElectionGuard.SDK;
|
||||
using ElectionGuard.SDK.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -26,7 +26,7 @@ namespace TestApp
|
|||
static int NUM_TRUSTEES = 3;
|
||||
static int THRESHOLD = 2;
|
||||
static int NUM_ENCRYPTERS = 3;
|
||||
static int NUM_SELECTIONS = 12; // the number of total contest selections for an election
|
||||
static int NUM_SELECTIONS = 17; // the number of total contest selections for an election
|
||||
static int DECRYPTING_TRUSTEES = 2; // must be >= THRESHOLD && <= NUM_TRUSTEES
|
||||
static int NUM_RANDOM_BALLOTS = 5; // the number of ballots to use when executing the test
|
||||
|
||||
|
@ -59,8 +59,7 @@ namespace TestApp
|
|||
|
||||
Console.WriteLine("\n--- Encrypt Ballots ---\n");
|
||||
|
||||
var now = new DateTime();
|
||||
|
||||
var now = DateTime.Now;
|
||||
|
||||
var expectedNumberOfSelected = 2;
|
||||
var encryptedBallotsFileName = "";
|
||||
|
@ -113,7 +112,7 @@ namespace TestApp
|
|||
|
||||
var loadBallotsResult = ElectionGuardApi.LoadBallotsFile(
|
||||
0,
|
||||
NUM_RANDOM_BALLOTS,
|
||||
2000,
|
||||
NUM_SELECTIONS,
|
||||
encryptedBallotsFileName
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче