Пример #1
0
        public async Task <CiphertextAcceptedBallot> BallotSpoilAsync(CiphertextBallot ballot, CiphertextElectionContext context, ElectionDescription description)
        {
            var ctxt = new AcceptBallotRequest()
            {
                ballot      = ballot,
                context     = context,
                description = description
            };

            return(await PostRequestAsync <CiphertextAcceptedBallot, AcceptBallotRequest>("/api/v1/ballot/spoil", ctxt));
        }
Пример #2
0
        public CiphertextAcceptedBallot BallotSpoil(CiphertextBallot ballot, CiphertextElectionContext context, ElectionDescription description)
        {
            var ctxt = new AcceptBallotRequest()
            {
                ballot      = ballot,
                context     = context,
                description = description
            };

            return(PostRequest <CiphertextAcceptedBallot, AcceptBallotRequest>("/api/v1/ballot/spoil", ctxt));
        }
                protected override bool Free()
                {
                    if (IsClosed)
                    {
                        return(true);
                    }

                    var status = CiphertextBallot.Free(this);

                    if (status != Status.ELECTIONGUARD_STATUS_SUCCESS)
                    {
                        Console.WriteLine($"CiphertextBallot Error Free: {status}");
                        return(false);
                    }
                    return(true);
                }